diff --git a/.gitignore b/.gitignore index 73819c4..d7b8bd7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ .bundle .config .yardoc -Gemfile.lock InstalledFiles _yardoc coverage @@ -22,3 +21,4 @@ tmp *.o *.a mkmf.log +.idea diff --git a/Gemfile b/Gemfile index 79425c4..765ace7 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,8 @@ source 'https://rubygems.org' # Specify your gem's dependencies in acts_as_enum.gemspec gemspec + +group :development, :test do + gem 'byebug' + gem 'sqlite3' +end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..44c4d44 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,47 @@ +PATH + remote: . + specs: + persistent_enum (1.0.9) + activerecord (~> 4.0) + activesupport (~> 4.0) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (4.2.4) + activesupport (= 4.2.4) + builder (~> 3.1) + activerecord (4.2.4) + activemodel (= 4.2.4) + activesupport (= 4.2.4) + arel (~> 6.0) + activesupport (4.2.4) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + arel (6.0.3) + builder (3.2.2) + byebug (6.0.2) + i18n (0.7.0) + json (1.8.3) + minitest (5.8.2) + rake (10.4.2) + sqlite3 (1.3.11) + thread_safe (0.3.5) + tzinfo (1.2.2) + thread_safe (~> 0.1) + +PLATFORMS + ruby + +DEPENDENCIES + bundler (~> 1.0) + byebug + persistent_enum! + rake (~> 10.0) + sqlite3 + +BUNDLED WITH + 1.10.6 diff --git a/lib/persistent_enum/version.rb b/lib/persistent_enum/version.rb index 8f44cf0..4af466f 100644 --- a/lib/persistent_enum/version.rb +++ b/lib/persistent_enum/version.rb @@ -1,3 +1,3 @@ module PersistentEnum - VERSION = "1.0.8" + VERSION = "1.0.9" end diff --git a/persistent_enum.gemspec b/persistent_enum.gemspec index 89ae7b5..fabdf63 100644 --- a/persistent_enum.gemspec +++ b/persistent_enum.gemspec @@ -7,10 +7,10 @@ Gem::Specification.new do |spec| spec.name = "persistent_enum" spec.version = PersistentEnum::VERSION spec.authors = ["Cerego"] - spec.email = ["edge@cerego.com"] - spec.summary = %q{Database-backed enums for Rails} - spec.description = %q{Provide a database-backed enumeration between indices and symbolic values. This allows us to have a valid foreign key which behaves like a enumeration. Values are cached at startup, and cannot be changed.} - spec.homepage = "http://www.cerego.co.jp" + spec.email = ["edge-usa@cerego.com"] + spec.summary = "Database-backed enums for Rails" + spec.description = "Provide a database-backed enumeration between indices and symbolic values. This allows us to have a valid foreign key which behaves like a enumeration. Values are cached at startup, and cannot be changed." + spec.homepage = "http://www.cerego.com" spec.license = "BSD-2-Clause" spec.files = `git ls-files -z`.split("\x0") @@ -18,13 +18,9 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_dependency "activerecord" - spec.add_dependency "activesupport" + spec.add_development_dependency "bundler", "~> 1.0" + spec.add_development_dependency "rake", "~> 10.0" - spec.add_development_dependency "bundler", "~> 1.6" - spec.add_development_dependency "rake" - - spec.add_development_dependency "sqlite3" - - spec.add_development_dependency "byebug" + spec.add_dependency "activerecord", "~> 4.0" + spec.add_dependency "activesupport", "~> 4.0" end diff --git a/test/unit/persistent_enum_test.rb b/test/unit/persistent_enum_test.rb index fe64baa..e6b6e78 100644 --- a/test/unit/persistent_enum_test.rb +++ b/test/unit/persistent_enum_test.rb @@ -101,10 +101,10 @@ def test_requires_constants CONSTANTS.each do |c| cached = TestRequiresConstant.const_get(c.upcase) - assert_present(cached) + assert(cached.present?) assert_equal(c.to_s, cached.name) stored = TestRequiresConstant.where(name: c.to_s).first - assert_present(stored) + assert(stored.present?) assert_equal(cached, stored) end @@ -124,7 +124,7 @@ def test_constant_naming end test_constants.each do |k, v| - assert_present(TestConstantName.const_get(v)) + assert(TestConstantName.const_get(v).present?) end destroy_test_model(:test_constant_name)