anima 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e6829c500ad676f1d8e6c000f33ee32a25be03c0
4
+ data.tar.gz: 7ae912dbe9f69ead50c7944dd2be42320eff08ac
5
+ SHA512:
6
+ metadata.gz: cd64e6435697e60ae07fdc3c1de8e5d26b432725b32748a22c106e9101682c2770261ffb284c33ff704bc15823487694c2dc97c63ca7e74e4668d1ceac801bba
7
+ data.tar.gz: f343a273dd4e96cbeed7e48843aa1bf753b79719ce2a279e49b3a4d3b5ccf6a3dc11cc3f9b059801946264bfef4265577eb4c6f5130a76bd7fbd2ae57d5724c5
data/.travis.yml CHANGED
@@ -1,14 +1,15 @@
1
1
  language: ruby
2
- bundler_args: --without guard
3
- script: "bundle exec rake ci"
2
+ script: 'bundle exec rake ci'
4
3
  rvm:
5
- - 1.8.7
6
4
  - 1.9.2
7
- - 1.9.3
8
- - jruby-18mode
9
- - jruby-19mode
10
- - rbx-18mode
5
+ - 2.0.0
6
+ - ruby-head
7
+ - jruby-19mode
8
+ - jruby-head
11
9
  - rbx-19mode
12
10
  notifications:
13
- email:
14
- - mbj@seonic.net
11
+ irc:
12
+ channels:
13
+ - irc.freenode.org#rom-rb
14
+ on_success: never
15
+ on_failure: change
data/Gemfile CHANGED
@@ -2,5 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'devtools', :git => 'https://github.com/datamapper/devtools.git'
5
+ gem 'devtools', :git => 'https://github.com/rom-rb/devtools.git'
6
6
  eval File.read('Gemfile.devtools')
data/Gemfile.devtools CHANGED
@@ -1,56 +1,47 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  group :development do
4
- gem 'rake', '~> 10.0.3'
5
- gem 'rspec', '~> 2.13.0'
6
- gem 'yard', '~> 0.8.5'
4
+ gem 'rake', '~> 10.1.0'
5
+ gem 'rspec', '~> 2.14.1'
6
+ gem 'yard', '~> 0.8.7'
7
7
  end
8
8
 
9
9
  group :yard do
10
- gem 'kramdown', '~> 0.14.2'
10
+ gem 'kramdown', '~> 1.1.0'
11
11
  end
12
12
 
13
13
  group :guard do
14
- gem 'guard', '~> 1.6.2'
14
+ gem 'guard', '~> 1.8.1'
15
15
  gem 'guard-bundler', '~> 1.0.0'
16
- gem 'guard-rspec', '~> 2.4.1'
16
+ gem 'guard-rspec', '~> 3.0.2'
17
+ gem 'guard-rubocop', '~> 0.2.0'
18
+ # gem 'guard-mutant', '~> 0.0.1'
17
19
 
18
20
  # file system change event handling
19
- gem 'rb-fchange', '~> 0.0.6', :require => false
20
- gem 'rb-fsevent', '~> 0.9.3', :require => false
21
- gem 'rb-inotify', '~> 0.9.0', :require => false
22
-
23
- gem 'listen', '~> 0.7.3'
21
+ gem 'listen', '~> 1.3.0'
22
+ gem 'rb-fchange', '~> 0.0.6', require: false
23
+ gem 'rb-fsevent', '~> 0.9.3', require: false
24
+ gem 'rb-inotify', '~> 0.9.0', require: false
24
25
 
25
26
  # notification handling
26
- gem 'libnotify', '~> 0.8.0', :require => false
27
- gem 'rb-notifu', '~> 0.0.4', :require => false
28
- gem 'terminal-notifier-guard', '~> 1.5.3', :require => false
27
+ gem 'libnotify', '~> 0.8.0', require: false
28
+ gem 'rb-notifu', '~> 0.0.4', require: false
29
+ gem 'terminal-notifier-guard', '~> 1.5.3', require: false
29
30
  end
30
31
 
31
32
  group :metrics do
32
- gem 'flay', '~> 2.1.0'
33
- gem 'flog', '~> 3.2.2'
34
- gem 'reek', '~> 1.3.1'
35
- gem 'metric_fu-roodi', '~> 2.2.1'
36
- gem 'yardstick', '~> 0.9.3'
37
-
38
- platforms :ruby_18, :ruby_19 do
39
- # this indirectly depends on ffi which does not build on ruby-head
33
+ gem 'coveralls', '~> 0.6.7'
34
+ gem 'flay', '~> 2.4.0'
35
+ gem 'flog', '~> 4.1.1'
36
+ gem 'reek', '~> 1.3.2'
37
+ gem 'rubocop', '~> 0.11.0'
38
+ gem 'simplecov', '~> 0.7.1'
39
+ gem 'yardstick', '~> 0.9.7', git: 'https://github.com/dkubb/yardstick.git'
40
+
41
+ platforms :ruby_19, :ruby_20 do
42
+ # gem 'mutant', git: 'https://github.com/mbj/mutant.git'
40
43
  gem 'yard-spellcheck', '~> 0.1.5'
41
44
  end
42
-
43
- platforms :mri_19, :rbx do
44
- gem 'mutant', '~> 0.2.20'
45
- end
46
-
47
- platforms :mri_19 do
48
- gem 'simplecov', '~> 0.7.1'
49
- end
50
-
51
- platforms :rbx do
52
- gem 'pelusa', '~> 0.2.2'
53
- end
54
45
  end
55
46
 
56
47
  group :benchmarks do
@@ -59,6 +50,6 @@ end
59
50
 
60
51
  platform :jruby do
61
52
  group :jruby do
62
- gem 'jruby-openssl', '~> 0.8.2'
53
+ gem 'jruby-openssl', '~> 0.8.5'
63
54
  end
64
55
  end
data/Rakefile CHANGED
@@ -1,3 +1,2 @@
1
1
  require 'devtools'
2
-
3
- Devtools.init
2
+ Devtools.init_rake_tasks
data/anima.gemspec CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'anima'
5
- s.version = '0.0.6'
5
+ s.version = '0.0.7'
6
6
 
7
7
  s.authors = ['Markus Schirp']
8
- s.email = 'mbj@seonic.net'
8
+ s.email = 'mbj@schirp-dso.com'
9
9
  s.summary = 'Attributes for Plain Old Ruby Objects Experiment'
10
10
  s.homepage = 'http://github.com/mbj/anima'
11
11
 
@@ -14,8 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.require_paths = %w(lib)
15
15
  s.extra_rdoc_files = %w(README.md)
16
16
 
17
- s.add_dependency('backports', [ '~> 3.0', '>= 3.0.3' ])
18
- s.add_dependency('adamantium', '~> 0.0.6')
19
- s.add_dependency('equalizer', '~> 0.0.4')
20
- s.add_dependency('abstract_type', '~> 0.0.4')
17
+ s.add_dependency('adamantium', '~> 0.1.0')
18
+ s.add_dependency('equalizer', '~> 0.0.7')
19
+ s.add_dependency('abstract_type', '~> 0.0.6')
21
20
  end
@@ -7,7 +7,7 @@ UncommunicativeParameterName:
7
7
  - !ruby/regexp /^.$/
8
8
  - !ruby/regexp /[0-9]$/
9
9
  - !ruby/regexp /[A-Z]/
10
- LargeClass:
10
+ TooManyMethods:
11
11
  max_methods: 10
12
12
  exclude: []
13
13
  enabled: true
@@ -26,7 +26,7 @@ LongParameterList:
26
26
  enabled: true
27
27
  overrides: {}
28
28
  FeatureEnvy:
29
- exclude:
29
+ exclude:
30
30
  - Anima#attributes_hash
31
31
  enabled: true
32
32
  ClassVariable:
@@ -47,15 +47,15 @@ UncommunicativeModuleName:
47
47
  - !ruby/regexp /[0-9]$/
48
48
  NestedIterators:
49
49
  ignore_iterators: []
50
- exclude:
50
+ exclude:
51
51
  - Anima::Attribute#define_reader # 2 levels
52
52
  enabled: true
53
53
  max_allowed_nesting: 1
54
- LongMethod:
54
+ TooManyStatements:
55
55
  max_statements: 7 # TODO: decrease max_statements to 5 or less
56
56
  exclude: []
57
57
  enabled: true
58
- Duplication:
58
+ DuplicateMethodCall:
59
59
  allow_calls: []
60
60
  exclude: []
61
61
  enabled: true
@@ -75,7 +75,7 @@ UncommunicativeVariableName:
75
75
  - !ruby/regexp /^.$/
76
76
  - !ruby/regexp /[0-9]$/
77
77
  - !ruby/regexp /[A-Z]/
78
- SimulatedPolymorphism:
78
+ RepeatedConditional:
79
79
  exclude: []
80
80
  enabled: true
81
81
  max_ifs: 1
@@ -84,7 +84,7 @@ DataClump:
84
84
  enabled: true
85
85
  max_copies: 1
86
86
  min_clump_size: 3
87
- ControlCouple:
87
+ ControlParameter:
88
88
  exclude: []
89
89
  enabled: true
90
90
  LongYieldList:
data/lib/anima/update.rb CHANGED
@@ -9,8 +9,8 @@ class Anima
9
9
  # include Anima.new(:foo, :bar), Anima::Update
10
10
  # end
11
11
  #
12
- # instance = klass.new(:foo => 1, :bar => 2)
13
- # updated = instance.update(:foo => 3)
12
+ # foo = klass.new(:foo => 1, :bar => 2)
13
+ # updated = foo.update(:foo => 3)
14
14
  # updated.foo # => 3
15
15
  # updated.bar # => 2
16
16
  #
@@ -25,5 +25,5 @@ class Anima
25
25
  klass.new(klass.attributes_hash(self).merge(attributes))
26
26
  end
27
27
 
28
- end
29
- end
28
+ end # Update
29
+ end # Anima
@@ -13,7 +13,7 @@ describe Anima::Attribute, '#define_reader' do
13
13
  end
14
14
  end
15
15
 
16
- let(:value) { mock('Value') }
16
+ let(:value) { double('Value') }
17
17
 
18
18
  it 'should create a reader' do
19
19
  instance = target_class.new(value)
@@ -17,7 +17,7 @@ describe Anima::Attribute, '#get' do
17
17
 
18
18
  let(:target) { target_class.new(value) }
19
19
 
20
- let(:value) { mock('Value') }
20
+ let(:value) { double('Value') }
21
21
 
22
22
  it 'should return value' do
23
23
  should be(value)
@@ -7,7 +7,7 @@ describe Anima::Attribute, '#load' do
7
7
 
8
8
  let(:target) { Object.new }
9
9
 
10
- let(:value) { mock('Value') }
10
+ let(:value) { double('Value') }
11
11
 
12
12
  context 'when attribute hash contains key' do
13
13
  let(:attribute_hash) { { :foo => value } }
@@ -7,7 +7,7 @@ describe Anima::Attribute, '#set' do
7
7
 
8
8
  let(:target) { Object.new }
9
9
 
10
- let(:value) { mock('Value') }
10
+ let(:value) { double('Value') }
11
11
 
12
12
  it_should_behave_like 'a command method'
13
13
 
@@ -3,9 +3,9 @@ require 'spec_helper'
3
3
  describe Anima, '#attributes_hash' do
4
4
  let(:object) { described_class.new(:foo) }
5
5
 
6
- let(:value) { mock('Value') }
6
+ let(:value) { double('Value') }
7
7
 
8
- let(:instance) { mock(:foo => value) }
8
+ let(:instance) { double(:foo => value) }
9
9
 
10
10
  subject { object.attributes_hash(instance) }
11
11
 
@@ -2,10 +2,10 @@ require 'spec_helper'
2
2
 
3
3
  describe Anima::Error, '#message' do
4
4
  let(:object) { described_class.new(klass, name) }
5
-
5
+
6
6
  subject { object.message }
7
7
 
8
- let(:klass) { mock(:name => 'THE-CLASS-NAME') }
8
+ let(:klass) { double(:name => 'THE-CLASS-NAME') }
9
9
  let(:name) { 'THE-ATTRIBUTE-NAME' }
10
10
 
11
11
  it 'should return the message string' do
@@ -10,11 +10,11 @@ describe Anima, '#included' do
10
10
  end
11
11
  end
12
12
 
13
- let(:value) { mock('Value') }
13
+ let(:value) { double('Value') }
14
14
 
15
15
  let(:instance) { target.new(:foo => value) }
16
16
  let(:instance_b) { target.new(:foo => value) }
17
- let(:instance_c) { target.new(:foo => mock('Bar')) }
17
+ let(:instance_c) { target.new(:foo => double('Bar')) }
18
18
 
19
19
  context 'on instance' do
20
20
  subject { instance }
@@ -5,8 +5,8 @@ describe Anima, '#initialize_instance' do
5
5
 
6
6
  let(:target) { Object.new }
7
7
 
8
- let(:foo) { mock('Foo') }
9
- let(:bar) { mock('Bar') }
8
+ let(:foo) { double('Foo') }
9
+ let(:bar) { double('Bar') }
10
10
 
11
11
  subject { object.initialize_instance(target, attribute_hash) }
12
12
 
@@ -24,7 +24,7 @@ describe Anima, '#initialize_instance' do
24
24
  end
25
25
 
26
26
  context 'when extra key is missing in attribute hash' do
27
- let(:attribute_hash) { { :foo => foo, :bar => bar, :baz => mock('Baz') } }
27
+ let(:attribute_hash) { { :foo => foo, :bar => bar, :baz => double('Baz') } }
28
28
 
29
29
  it 'should raise error' do
30
30
  expect { subject }.to raise_error(Anima::Error::Unknown, Anima::Error::Unknown.new(target.class, [:baz]).message)
metadata CHANGED
@@ -1,88 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anima
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Markus Schirp
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-02 00:00:00.000000000 Z
11
+ date: 2013-08-22 00:00:00.000000000 Z
13
12
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: backports
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '3.0'
22
- - - ! '>='
23
- - !ruby/object:Gem::Version
24
- version: 3.0.3
25
- type: :runtime
26
- prerelease: false
27
- version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ~>
31
- - !ruby/object:Gem::Version
32
- version: '3.0'
33
- - - ! '>='
34
- - !ruby/object:Gem::Version
35
- version: 3.0.3
36
13
  - !ruby/object:Gem::Dependency
37
14
  name: adamantium
38
15
  requirement: !ruby/object:Gem::Requirement
39
- none: false
40
16
  requirements:
41
17
  - - ~>
42
18
  - !ruby/object:Gem::Version
43
- version: 0.0.6
19
+ version: 0.1.0
44
20
  type: :runtime
45
21
  prerelease: false
46
22
  version_requirements: !ruby/object:Gem::Requirement
47
- none: false
48
23
  requirements:
49
24
  - - ~>
50
25
  - !ruby/object:Gem::Version
51
- version: 0.0.6
26
+ version: 0.1.0
52
27
  - !ruby/object:Gem::Dependency
53
28
  name: equalizer
54
29
  requirement: !ruby/object:Gem::Requirement
55
- none: false
56
30
  requirements:
57
31
  - - ~>
58
32
  - !ruby/object:Gem::Version
59
- version: 0.0.4
33
+ version: 0.0.7
60
34
  type: :runtime
61
35
  prerelease: false
62
36
  version_requirements: !ruby/object:Gem::Requirement
63
- none: false
64
37
  requirements:
65
38
  - - ~>
66
39
  - !ruby/object:Gem::Version
67
- version: 0.0.4
40
+ version: 0.0.7
68
41
  - !ruby/object:Gem::Dependency
69
42
  name: abstract_type
70
43
  requirement: !ruby/object:Gem::Requirement
71
- none: false
72
44
  requirements:
73
45
  - - ~>
74
46
  - !ruby/object:Gem::Version
75
- version: 0.0.4
47
+ version: 0.0.6
76
48
  type: :runtime
77
49
  prerelease: false
78
50
  version_requirements: !ruby/object:Gem::Requirement
79
- none: false
80
51
  requirements:
81
52
  - - ~>
82
53
  - !ruby/object:Gem::Version
83
- version: 0.0.4
54
+ version: 0.0.6
84
55
  description:
85
- email: mbj@seonic.net
56
+ email: mbj@schirp-dso.com
86
57
  executables: []
87
58
  extensions: []
88
59
  extra_rdoc_files:
@@ -102,8 +73,8 @@ files:
102
73
  - config/flay.yml
103
74
  - config/flog.yml
104
75
  - config/mutant.yml
76
+ - config/reek.yml
105
77
  - config/roodi.yml
106
- - config/site.reek
107
78
  - config/yardstick.yml
108
79
  - lib/anima.rb
109
80
  - lib/anima/attribute.rb
@@ -124,27 +95,26 @@ files:
124
95
  - spec/unit/anima/update/update_spec.rb
125
96
  homepage: http://github.com/mbj/anima
126
97
  licenses: []
98
+ metadata: {}
127
99
  post_install_message:
128
100
  rdoc_options: []
129
101
  require_paths:
130
102
  - lib
131
103
  required_ruby_version: !ruby/object:Gem::Requirement
132
- none: false
133
104
  requirements:
134
- - - ! '>='
105
+ - - '>='
135
106
  - !ruby/object:Gem::Version
136
107
  version: '0'
137
108
  required_rubygems_version: !ruby/object:Gem::Requirement
138
- none: false
139
109
  requirements:
140
- - - ! '>='
110
+ - - '>='
141
111
  - !ruby/object:Gem::Version
142
112
  version: '0'
143
113
  requirements: []
144
114
  rubyforge_project:
145
- rubygems_version: 1.8.23
115
+ rubygems_version: 2.0.2
146
116
  signing_key:
147
- specification_version: 3
117
+ specification_version: 4
148
118
  summary: Attributes for Plain Old Ruby Objects Experiment
149
119
  test_files:
150
120
  - spec/integration/simple_spec.rb