shoulda-whenever 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b556da7fd43cfccee5935c3c6a63eb2fd51ec05b
4
- data.tar.gz: e57ef2772b14aa2ea0b04ea4ad1ae5c34ef48d5e
3
+ metadata.gz: 59ed405ddf11a382dda5df24952ffdfe8585c4f6
4
+ data.tar.gz: 630bb1b77d457e30762bc1ac039ed82635243731
5
5
  SHA512:
6
- metadata.gz: fed62e52acf39bd842e32adcf34192b7a431edd89bdf938dd3b0f24617eb7e77c48f87f12f075a883d5b866728a895a17a1aa27526b40262f20dbf23ac65e9af
7
- data.tar.gz: 8a59abf46d0c53c03c24609c1fca40458a9ee444d9b9f69c4ded72cccff07e7153713c8e36b58f7e55472e2c22f104da1be2192c9895435f78be30deba286301
6
+ metadata.gz: 8d8d634e008a08827a95394baefef61a54fbccb9eb369a0b883c98c632478ad8c50f739e060cbb2063a699d671e916782bb6e163997904fb38cad6f7a0ad14d8
7
+ data.tar.gz: ae3aeab75d8e59ee70e953c1ab7fa060fa078c1aa80a6fe434d7aec9f091d660b10fc7e78c4fe9061023a5b5966c2ba79b7896adb3049e18a1d12df7de0ba392
data/.gitignore CHANGED
@@ -1,4 +1,3 @@
1
1
  bin/
2
2
  vendor/
3
3
  .bundle
4
- .rspec
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --color
2
+ --order random
3
+ --format documentation
4
+ --require spec_helper
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "rspec", "~> 3.3.0"
3
+ gem "rspec", "~> 3.4.0"
4
4
  gem "whenever", "~> 0.9.4"
@@ -3,19 +3,19 @@ GEM
3
3
  specs:
4
4
  chronic (0.10.2)
5
5
  diff-lcs (1.2.5)
6
- rspec (3.3.0)
7
- rspec-core (~> 3.3.0)
8
- rspec-expectations (~> 3.3.0)
9
- rspec-mocks (~> 3.3.0)
10
- rspec-core (3.3.2)
11
- rspec-support (~> 3.3.0)
12
- rspec-expectations (3.3.1)
6
+ rspec (3.4.0)
7
+ rspec-core (~> 3.4.0)
8
+ rspec-expectations (~> 3.4.0)
9
+ rspec-mocks (~> 3.4.0)
10
+ rspec-core (3.4.4)
11
+ rspec-support (~> 3.4.0)
12
+ rspec-expectations (3.4.0)
13
13
  diff-lcs (>= 1.2.0, < 2.0)
14
- rspec-support (~> 3.3.0)
15
- rspec-mocks (3.3.2)
14
+ rspec-support (~> 3.4.0)
15
+ rspec-mocks (3.4.1)
16
16
  diff-lcs (>= 1.2.0, < 2.0)
17
- rspec-support (~> 3.3.0)
18
- rspec-support (3.3.0)
17
+ rspec-support (~> 3.4.0)
18
+ rspec-support (3.4.1)
19
19
  whenever (0.9.4)
20
20
  chronic (>= 0.6.3)
21
21
 
@@ -23,5 +23,8 @@ PLATFORMS
23
23
  ruby
24
24
 
25
25
  DEPENDENCIES
26
- rspec (~> 3.3.0)
26
+ rspec (~> 3.4.0)
27
27
  whenever (~> 0.9.4)
28
+
29
+ BUNDLED WITH
30
+ 1.11.2
data/README.md CHANGED
@@ -7,7 +7,7 @@ This gem was born out of a desire to test the schedule for tasks being scheduled
7
7
  Add this to you gemfile:
8
8
 
9
9
  ```ruby
10
- gem "shoulda-whenever", "~> 0.0.1", "https://github.com/MGerrior/shoulda-whenever.git"
10
+ gem "shoulda-whenever", "~> 0.0.2"
11
11
  ```
12
12
 
13
13
  Create a new schedule to be tested at `config/schedule.rb` (or anywhere really, but for the sake of the README, that's where it is):
@@ -23,9 +23,9 @@ Create a new test file for testing your schedule, perhaps something like `spec/s
23
23
  ```ruby
24
24
  describe "Schedule" do
25
25
  include Shoulda::Whenever
26
-
26
+
27
27
  let(:whenever) { Whenever::JobList.new(file: File.join(Rails.root, "config", "schedule.rb").to_s) }
28
-
28
+
29
29
  it "sends out the team lunch reminder email every friday at noon" do
30
30
  expect(whenever).to schedule("Notifier.send_team_lunch_email").every(:friday).at("12:00 PM")
31
31
  end
@@ -12,10 +12,10 @@ module Shoulda
12
12
  attr_reader :duration, :time, :task, :roles
13
13
 
14
14
  def initialize(task)
15
- @task = task
15
+ @task = task
16
16
  @duration = nil
17
- @time = nil
18
- @roles = nil
17
+ @time = nil
18
+ @roles = nil
19
19
  end
20
20
 
21
21
  def matches?(subject)
@@ -1,5 +1,5 @@
1
1
  module Shoulda
2
2
  module Whenever
3
- VERSION = "0.0.1".freeze
3
+ VERSION = "0.0.2".freeze
4
4
  end
5
5
  end
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
18
18
 
19
19
  s.required_ruby_version = '>= 1.9.3'
20
20
 
21
- s.add_development_dependency "rspec", "~> 3.3.0"
21
+ s.add_development_dependency "rspec", "~> 3.4", ">= 3.4.0"
22
22
  s.add_development_dependency "whenever", "~> 0.9.4"
23
23
  end
@@ -1,78 +1,3 @@
1
- # This file was generated by the `rspec --init` command. Conventionally, all
2
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
- # file to always be loaded, without a need to explicitly require it in any files.
5
- #
6
- # Given that it is always loaded, you are encouraged to keep this file as
7
- # light-weight as possible. Requiring heavyweight dependencies from this file
8
- # will add to the boot time of your test suite on EVERY test run, even for an
9
- # individual file that may not need all of that loaded. Instead, make a
10
- # separate helper file that requires this one and then use it only in the specs
11
- # that actually need it.
12
- #
13
- # The `.rspec` file also contains a few flags that are not defaults but that
14
- # users commonly want.
15
- #
16
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
1
  RSpec.configure do |config|
18
- # The settings below are suggested to provide a good initial experience
19
- # with RSpec, but feel free to customize to your heart's content.
20
- =begin
21
- # These two settings work together to allow you to limit a spec run
22
- # to individual examples or groups you care about by tagging them with
23
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
24
- # get run.
25
- config.filter_run :focus
26
- config.run_all_when_everything_filtered = true
27
2
 
28
- # Many RSpec users commonly either run the entire suite or an individual
29
- # file, and it's useful to allow more verbose output when running an
30
- # individual spec file.
31
- if config.files_to_run.one?
32
- # Use the documentation formatter for detailed output,
33
- # unless a formatter has already been configured
34
- # (e.g. via a command-line flag).
35
- config.default_formatter = 'doc'
36
- end
37
-
38
- # Print the 10 slowest examples and example groups at the
39
- # end of the spec run, to help surface which specs are running
40
- # particularly slow.
41
- config.profile_examples = 10
42
-
43
- # Run specs in random order to surface order dependencies. If you find an
44
- # order dependency and want to debug it, you can fix the order by providing
45
- # the seed, which is printed after each run.
46
- # --seed 1234
47
- config.order = :random
48
-
49
- # Seed global randomization in this process using the `--seed` CLI option.
50
- # Setting this allows you to use `--seed` to deterministically reproduce
51
- # test failures related to randomization by passing the same `--seed` value
52
- # as the one that triggered the failure.
53
- Kernel.srand config.seed
54
-
55
- # rspec-expectations config goes here. You can use an alternate
56
- # assertion/expectation library such as wrong or the stdlib/minitest
57
- # assertions if you prefer.
58
- config.expect_with :rspec do |expectations|
59
- # Enable only the newer, non-monkey-patching expect syntax.
60
- # For more details, see:
61
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
- expectations.syntax = :expect
63
- end
64
-
65
- # rspec-mocks config goes here. You can use an alternate test double
66
- # library (such as bogus or mocha) by changing the `mock_with` option here.
67
- config.mock_with :rspec do |mocks|
68
- # Enable only the newer, non-monkey-patching expect syntax.
69
- # For more details, see:
70
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
71
- mocks.syntax = :expect
72
-
73
- # Prevents you from mocking or stubbing a method that does not exist on
74
- # a real object. This is generally recommended.
75
- mocks.verify_partial_doubles = true
76
- end
77
- =end
78
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-whenever
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Gerrior
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-05 00:00:00.000000000 Z
11
+ date: 2016-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.3.0
19
+ version: '3.4'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.4.0
20
23
  type: :development
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: 3.3.0
29
+ version: '3.4'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.4.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: whenever
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -46,6 +52,7 @@ extensions: []
46
52
  extra_rdoc_files: []
47
53
  files:
48
54
  - ".gitignore"
55
+ - ".rspec"
49
56
  - Gemfile
50
57
  - Gemfile.lock
51
58
  - README.md
@@ -85,4 +92,3 @@ test_files:
85
92
  - spec/shoulda/whenever/schedule_matcher_spec.rb
86
93
  - spec/spec_helper.rb
87
94
  - spec/support/schedule.rb
88
- has_rdoc: