OSDN Git Service

use bundler
authornomeu <nomeu@users.sourceforge.jp>
Wed, 6 Jul 2011 16:29:03 +0000 (01:29 +0900)
committernomeu <nomeu@users.sourceforge.jp>
Wed, 6 Jul 2011 16:29:03 +0000 (01:29 +0900)
Gemfile [new file with mode: 0644]
Gemfile.lock [new file with mode: 0644]
bin/read-zip.rb
lib/connection.rb

diff --git a/Gemfile b/Gemfile
new file mode 100644 (file)
index 0000000..867ee52
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,17 @@
+# Edit this Gemfile to bundle your application's dependencies.
+# This preamble is the current preamble for Rails 3 apps; edit as needed.
+source 'http://rubygems.org'
+
+gem 'activerecord', '3.0.6'
+
+gem 'pg', '0.10.1'
+
+gem 'zipruby'
+
+# Bundle gems for the local environment. Make sure to
+# put test-only gems in this group so their generators
+# and rake tasks are available in development mode:
+group :development, :test do
+  gem 'rspec', '2.6.0'
+  # gem 'webrat'
+end
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644 (file)
index 0000000..d65f697
--- /dev/null
@@ -0,0 +1,37 @@
+GEM
+  remote: http://rubygems.org/
+  specs:
+    activemodel (3.0.6)
+      activesupport (= 3.0.6)
+      builder (~> 2.1.2)
+      i18n (~> 0.5.0)
+    activerecord (3.0.6)
+      activemodel (= 3.0.6)
+      activesupport (= 3.0.6)
+      arel (~> 2.0.2)
+      tzinfo (~> 0.3.23)
+    activesupport (3.0.6)
+    arel (2.0.10)
+    builder (2.1.2)
+    diff-lcs (1.1.2)
+    i18n (0.5.0)
+    pg (0.10.1)
+    rspec (2.6.0)
+      rspec-core (~> 2.6.0)
+      rspec-expectations (~> 2.6.0)
+      rspec-mocks (~> 2.6.0)
+    rspec-core (2.6.4)
+    rspec-expectations (2.6.0)
+      diff-lcs (~> 1.1.2)
+    rspec-mocks (2.6.0)
+    tzinfo (0.3.29)
+    zipruby (0.3.6)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  activerecord (= 3.0.6)
+  pg (= 0.10.1)
+  rspec (= 2.6.0)
+  zipruby
index 9fdb3f4..fe9677e 100644 (file)
@@ -4,10 +4,10 @@ $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
 require 'scrap'
 
 location = ARGV.shift || 'mmd'
-scrap = Scrap.find_by_location(location)
+scrap = Scrap.find_by_location_code(location)
 
 require 'rubygems'
-gem 'zipruby'
+require 'bundler/setup'
 require 'zipruby'
 require 'nkf'
 
index 80c4525..fdfb4e1 100644 (file)
@@ -2,6 +2,6 @@ require 'yaml'
 environment = ENV["RAILS_ENV"] || "development"
 options = YAML.load(IO.read("config/database.yml"))[environment]
 require 'rubygems'
-gem 'activerecord'
+require 'bundler/setup'
 require 'active_record'
 ActiveRecord::Base.establish_connection(options)