lev 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDA3ZTU4MzVlZmQxZDAyYzc3NzUyMmMxNmU5MmQ3MWM1ODE5MDhmZQ==
4
+ ZmU1YjllMzk3Nzk1M2NhZmE5YzAxNWJmNWI2NDNmZTIwMWUwNTQ1Mw==
5
5
  data.tar.gz: !binary |-
6
- NzkyYzQ5NDRmMDk1NzgzNmY1YzhhM2Q2OGIwOGVkNzAyNDU1ZmIzNQ==
6
+ Nzc2NjI3MGNkNjVkYzljYmM3OGM1ZWE0NTIxMjI0OTExMzI4MzhlZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzhhZmQ3ZDdjM2IxMTRiNGQ2NGI3ZjgyNWQ5NTUzNWY2MmVkYWJlMDUyOTE2
10
- MzU3MTMzZmNjNGIxYmQ2ZDQ2YjdhMDNiMmU2MTAyZDNjYWE5YjNmMjU2ZWFi
11
- NjFlMGM3ZDM1NzQ4YjZjNTMwZjhmOGE0OGNhNzgwN2FiYzVhOTU=
9
+ MjVhYjY3MTU5YWMwMjhkMmNhMzgxZGFhOTUxYTdkMDA0NDhlNTY1YjJhMDA2
10
+ Y2UwNTEyM2JkZDlkYzllNDlhYzQzNTFjZjI0MWRiZjZhYzIzN2JiMmU4YWEx
11
+ N2M0N2EzYjNlNTBiNzZhZDI1OGIzZmIwNTljMWM4MTE2ZWY2NmU=
12
12
  data.tar.gz: !binary |-
13
- Njc3OTEwZjJhZjQyNTZhMDM2ZGFiYjc0ZGMyN2IzMjA5NTFiNTk5ZTgxNWYx
14
- YTNlMGEyODQ5Y2Y1ZWUyMGUwZmI2ZGI4MzhiYmYyYjUwYjZmNDg5Y2QzMDQ3
15
- MDU1MzRlMWJlZDBmNWE3MjY3OTBmYzg2NGYwMzU0MTUyODBiZWU=
13
+ MDAzNDY3Y2YxNWIwYjM0MjM5YTU0OWZiMTUyODYzMGE2ZGYxYmQ2ZjEyNmYw
14
+ YTkzMDNlYmZhMjM3Y2EyZDUyYzliYTZhY2YyZjgyMTMxYzBkNTY2MzdjMWRm
15
+ ODI5Zjk5ZThlODI3ZTAxMzRhMzE5MjBkMWNiNmZkNDY1NGRmMDI=
@@ -1,3 +1,3 @@
1
1
  module Lev
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
@@ -5,7 +5,6 @@
5
5
  #
6
6
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
7
  RSpec.configure do |config|
8
- config.treat_symbols_as_metadata_keys_with_true_values = true
9
8
  config.run_all_when_everything_filtered = true
10
9
  config.filter_run :focus
11
10
 
@@ -36,3 +35,5 @@ unless Sprocket.table_exists?
36
35
  end
37
36
  end
38
37
  end
38
+
39
+ I18n.enforce_available_locales = true
@@ -2,25 +2,27 @@ require 'spec_helper'
2
2
 
3
3
  describe SprocketHandler do
4
4
  it 'should return fatal error messages' do
5
- SprocketHandler.any_instance.stub(:params).and_return({
6
- sprocket: {
7
- integer_gt_2: '1',
8
- text_only_letters: '42',
9
- }
10
- })
5
+ allow_any_instance_of(SprocketHandler).to(
6
+ receive(:params).and_return({
7
+ sprocket: {
8
+ integer_gt_2: '1',
9
+ text_only_letters: '42',
10
+ }
11
+ }))
11
12
  result = SprocketHandler.handle
12
13
  errors = result.errors.collect { |error| error.translate }
13
14
  expect(errors).to eq(['Code cannot be blank'])
14
15
  end
15
16
 
16
17
  it 'should return fatal error codes if messages are missing' do
17
- SprocketHandler.any_instance.stub(:params).and_return({
18
- sprocket: {
19
- integer_gt_2: '1',
20
- text_only_letters: '42',
21
- },
22
- code: '1111',
23
- })
18
+ allow_any_instance_of(SprocketHandler).to(
19
+ receive(:params).and_return({
20
+ sprocket: {
21
+ integer_gt_2: '1',
22
+ text_only_letters: '42',
23
+ },
24
+ code: '1111',
25
+ }))
24
26
  result = SprocketHandler.handle
25
27
  errors = result.errors.collect { |error| error.translate }
26
28
  expect(errors).to eq(['invalid_code'])
@@ -4,7 +4,7 @@ describe Sprocket do
4
4
 
5
5
  it "should not be valid with bad inputs" do
6
6
  sprocket = Sprocket.new(integer_gt_2: 1, text_only_letters: 'abcd4')
7
- expect(sprocket.valid?).to be_false
7
+ expect(sprocket.valid?).to eq(false)
8
8
  expect(sprocket.errors.count).to eq 2
9
9
  end
10
10
 
@@ -1,3 +1,5 @@
1
+ require 'support/create_sprocket'
2
+
1
3
  class SprocketHandler
2
4
 
3
5
  include Lev::Handler
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lev
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-28 00:00:00.000000000 Z
11
+ date: 2014-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: bundler
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
- version: '1.3'
117
+ version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - ! '>='
123
123
  - !ruby/object:Gem::Version
124
- version: '1.3'
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -185,17 +185,9 @@ executables: []
185
185
  extensions: []
186
186
  extra_rdoc_files: []
187
187
  files:
188
- - .gitignore
189
- - .rspec
190
- - .ruby-gemset
191
- - .ruby-version
192
- - .travis.yml
193
- - Gemfile
194
- - Gemfile.lock
195
188
  - LICENSE.txt
196
189
  - README.md
197
190
  - Rakefile
198
- - lev.gemspec
199
191
  - lib/lev.rb
200
192
  - lib/lev/better_active_model_errors.rb
201
193
  - lib/lev/delegate_to_routine.rb
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- .bundle/
2
- log/*.log
3
- pkg/
4
- spec/dummy/db/*.sqlite3
5
- spec/dummy/log/*.log
6
- spec/dummy/tmp/
7
- spec/dummy/.sass-cache
8
- *.DS_Store
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --format progress
3
- --debug
@@ -1 +0,0 @@
1
- lev
@@ -1 +0,0 @@
1
- ruby-1.9.3-p392
@@ -1,9 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "1.9.3-p392"
4
- install:
5
- - bundle install
6
- script:
7
- - bundle exec rake
8
- notifications:
9
- email: false
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in lev.gemspec
4
- gemspec
@@ -1,87 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- lev (2.1.0)
5
- actionpack (>= 3.0)
6
- active_attr
7
- activemodel (>= 3.0)
8
- activerecord (>= 3.0)
9
- hashie
10
- transaction_isolation
11
- transaction_retry
12
-
13
- GEM
14
- remote: https://rubygems.org/
15
- specs:
16
- actionpack (4.1.1)
17
- actionview (= 4.1.1)
18
- activesupport (= 4.1.1)
19
- rack (~> 1.5.2)
20
- rack-test (~> 0.6.2)
21
- actionview (4.1.1)
22
- activesupport (= 4.1.1)
23
- builder (~> 3.1)
24
- erubis (~> 2.7.0)
25
- active_attr (0.8.3)
26
- activemodel (>= 3.0.2, < 4.2)
27
- activesupport (>= 3.0.2, < 4.2)
28
- activemodel (4.1.1)
29
- activesupport (= 4.1.1)
30
- builder (~> 3.1)
31
- activerecord (4.1.1)
32
- activemodel (= 4.1.1)
33
- activesupport (= 4.1.1)
34
- arel (~> 5.0.0)
35
- activesupport (4.1.1)
36
- i18n (~> 0.6, >= 0.6.9)
37
- json (~> 1.7, >= 1.7.7)
38
- minitest (~> 5.1)
39
- thread_safe (~> 0.1)
40
- tzinfo (~> 1.1)
41
- arel (5.0.1.20140414130214)
42
- builder (3.2.2)
43
- columnize (0.3.6)
44
- debugger (1.6.2)
45
- columnize (>= 0.3.1)
46
- debugger-linecache (~> 1.2.0)
47
- debugger-ruby_core_source (~> 1.2.3)
48
- debugger-linecache (1.2.0)
49
- debugger-ruby_core_source (1.2.3)
50
- diff-lcs (1.2.4)
51
- erubis (2.7.0)
52
- hashie (2.1.1)
53
- i18n (0.6.9)
54
- json (1.8.1)
55
- minitest (5.3.4)
56
- rack (1.5.2)
57
- rack-test (0.6.2)
58
- rack (>= 1.0)
59
- rake (10.1.0)
60
- rspec (2.14.1)
61
- rspec-core (~> 2.14.0)
62
- rspec-expectations (~> 2.14.0)
63
- rspec-mocks (~> 2.14.0)
64
- rspec-core (2.14.5)
65
- rspec-expectations (2.14.3)
66
- diff-lcs (>= 1.1.3, < 2.0)
67
- rspec-mocks (2.14.3)
68
- sqlite3 (1.3.9)
69
- thread_safe (0.3.4)
70
- transaction_isolation (1.0.3)
71
- activerecord (>= 3.0.11)
72
- transaction_retry (1.0.2)
73
- activerecord (>= 3.0.11)
74
- transaction_isolation (>= 1.0.2)
75
- tzinfo (1.2.0)
76
- thread_safe (~> 0.1)
77
-
78
- PLATFORMS
79
- ruby
80
-
81
- DEPENDENCIES
82
- bundler (~> 1.3)
83
- debugger
84
- lev!
85
- rake
86
- rspec
87
- sqlite3
@@ -1,35 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'lev/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "lev"
8
- spec.version = Lev::VERSION
9
- spec.authors = ["JP Slavinsky"]
10
- spec.email = ["jps@kindlinglabs.com"]
11
- spec.description = %q{Ride the rails but don't touch them.}
12
- spec.summary = %q{Ride the rails but don't touch them.}
13
- spec.homepage = "http://github.com/lml/lev"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_runtime_dependency(%q<activemodel>, [">= 3.0"])
22
- spec.add_runtime_dependency(%q<activerecord>, [">= 3.0"])
23
- spec.add_runtime_dependency(%q<actionpack>, [">= 3.0"])
24
- spec.add_runtime_dependency "transaction_isolation"
25
- spec.add_runtime_dependency "transaction_retry"
26
- spec.add_runtime_dependency "active_attr"
27
- spec.add_runtime_dependency "hashie"
28
-
29
- spec.add_development_dependency "bundler", "~> 1.3"
30
- spec.add_development_dependency "rake"
31
- spec.add_development_dependency "rspec"
32
- spec.add_development_dependency "sqlite3"
33
- spec.add_development_dependency "debugger"
34
-
35
- end