microscope 0.5.6.1 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4104e08b3fb2b4e9dacc155a2ff1cad414f2560
4
- data.tar.gz: 8fd697dfdb64bf4d9f2134338dc97671d02d3534
3
+ metadata.gz: 42926873b4c35009b176d9ee2bf2928bddf7ef35
4
+ data.tar.gz: d3b1659915412d6429b51565a5665e52f7b8eed3
5
5
  SHA512:
6
- metadata.gz: f12f867b2e8bfc04f2dc2335a185de37860ea3eac5db0d41d82b016635489b5cc29b7503b8234bbcb18665a8ae7ed4128e47e501ef4ce100c7d40e90669f50fb
7
- data.tar.gz: 3dbbd6cf2abe0c28ab8c1d5ca602c3311825809e3a89e6bcb74690da396fe7e9c571ac76e864edb129101d9a7e51713deec00c6a676f6031b341cfcfc6b8a7b6
6
+ metadata.gz: 729e7481c9b34ec14105f8a1128a8ab925fb677e6388940ba43c9ba264f76d289b20404e7ec332a894a8dcb0bfab1d6c8fa394441e4b24072ee9bd20ba45ce9d
7
+ data.tar.gz: 20203298794289b9ccc8abd500bd8f719d5b60448c288c4572571238ff29611d6fb1302099dce1cd8340a0718c60233fc574d47e18916b0aca9afde3b4e2776c
data/.travis.yml CHANGED
@@ -18,3 +18,11 @@ before_script:
18
18
  - psql -c 'create database microscope_test;' -U postgres
19
19
 
20
20
  script: "echo 'DO IT' && bundle exec rake spec"
21
+
22
+ notifications:
23
+ hipchat:
24
+ rooms:
25
+ secure: cJWiEh3XNWrEkoeaZd5Kyx3igwOJto+B8jPiyr38Kfv8Z2WLINkHbMQXcd37/tIubX6w9VWjWJ2TuX5cK2H07EraPDDYAHJlnoR/WIPoYwQoXGUWqGH26O2LdBiLs9JcBQ9rKT8K8wmQuxf2rTpY7lN2RoKMjjEjcleWJwQG/3w=
26
+ template:
27
+ - '%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} (<a href="%{build_url}">Build</a>/<a href="%{compare_url}">Changes</a>)'
28
+ format: 'html'
@@ -9,6 +9,12 @@ module Microscope
9
9
  send("#{field.name}=", true)
10
10
  save!
11
11
  end
12
+
13
+ define_method "not_#{infinitive_verb}!" do
14
+ send("#{field.name}=", false)
15
+ save!
16
+ end
17
+ alias_method 'un#{infinitive_verb}!', 'not_#{infinitive_verb}!'
12
18
  RUBY
13
19
  end
14
20
  end
@@ -36,6 +36,12 @@ module Microscope
36
36
  send("#{field.name}=", #{@now})
37
37
  save!
38
38
  end
39
+
40
+ define_method "not_#{infinitive_verb}!" do
41
+ send("#{field.name}=", nil)
42
+ save!
43
+ end
44
+ alias_method 'un#{infinitive_verb}!', 'not_#{infinitive_verb}!'
39
45
  RUBY
40
46
  end
41
47
  end
@@ -36,6 +36,12 @@ module Microscope
36
36
  send("#{field.name}=", #{@now})
37
37
  save!
38
38
  end
39
+
40
+ define_method "not_#{infinitive_verb}!" do
41
+ send("#{field.name}=", nil)
42
+ save!
43
+ end
44
+ alias_method 'un#{infinitive_verb}!', 'not_#{infinitive_verb}!'
39
45
  RUBY
40
46
  end
41
47
  end
@@ -1,3 +1,3 @@
1
1
  module Microscope
2
- VERSION = '0.5.6.1'
2
+ VERSION = '0.5.7'
3
3
  end
@@ -15,4 +15,10 @@ describe Microscope::InstanceMethod::BooleanInstanceMethod do
15
15
  let(:animal) { Animal.create(fed: false) }
16
16
  it { expect { animal.feed! }.to change { animal.reload.fed? }.from(false).to(true) }
17
17
  end
18
+
19
+ describe '#not_feed!' do
20
+ let(:animal) { Animal.create(fed: true) }
21
+ it { expect { animal.not_feed! }.to change { animal.reload.fed? }.from(true).to(false) }
22
+ it { expect(animal).to respond_to(:unfeed!) }
23
+ end
18
24
  end
@@ -79,4 +79,12 @@ describe Microscope::InstanceMethod::DateInstanceMethod do
79
79
  let(:event) { Event.create(started_on: nil) }
80
80
  it { expect { event.start! }.to change { event.reload.started_on }.from(nil).to(stubbed_date) }
81
81
  end
82
+
83
+ describe '#start!' do
84
+ let(:stubbed_date) { Date.parse('2020-03-18 08:00:00') }
85
+
86
+ let(:event) { Event.create(started_on: stubbed_date) }
87
+ it { expect { event.not_start! }.to change { event.reload.started_on }.from(stubbed_date).to(nil) }
88
+ it { expect(event).to respond_to(:unstart!) }
89
+ end
82
90
  end
@@ -67,6 +67,13 @@ describe Microscope::InstanceMethod::DatetimeInstanceMethod do
67
67
 
68
68
  let(:event) { Event.create(started_at: nil) }
69
69
  it { expect { event.start! }.to change { event.reload.started_at }.from(nil).to(stubbed_date) }
70
- it { expect(event).to respond_to(:start!) }
70
+ end
71
+
72
+ describe '#not_start!' do
73
+ let(:stubbed_date) { Time.parse('2020-03-18 08:00:00') }
74
+
75
+ let(:event) { Event.create(started_at: stubbed_date) }
76
+ it { expect { event.not_start! }.to change { event.reload.started_at }.from(stubbed_date).to(nil) }
77
+ it { expect(event).to respond_to(:unstart!) }
71
78
  end
72
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microscope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6.1
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Prévost
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-17 00:00:00.000000000 Z
12
+ date: 2014-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport