aptible-tasks 0.1.3 → 0.1.4

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: e35ba37d5d3198675980e015a3e33f799da27fb1
4
- data.tar.gz: a3c1fc2359f3c64218ee777ead292394f68813d4
3
+ metadata.gz: adb827708d8e812a7a26e5fa0b16ef7566425c30
4
+ data.tar.gz: 6acb1b9eb561e012059b4b78eba287fc6fcd2b31
5
5
  SHA512:
6
- metadata.gz: 45049584da4ba259b801757401854f9244134084b317d344655f0607647b730d68c5873b6d5205ce1941a6ef85088b06bcd201f095810a1e68312f56035d6f5a
7
- data.tar.gz: b38f113a85e0043c3ee22af784876cc6f90992f153592c36ef156321564e98aa8f6bd59dc282b4853ee53ba593cf107dd0e06df33087535e2ac5835c40cc79ea
6
+ metadata.gz: 85370401d389c7596ac2b70b7529d9eae45492ac6ffe22aa7a09918ec2c800d4cb52f7f0e2fd5a06edb84081bcdfcaa3c7f52c5fa2194eb803f74472346b8bd6
7
+ data.tar.gz: 6bc98d0b091d342d8f491539c1e579d8631d14d168bbbe2f5c74e947d648c03b123b76c5eb153c49b7b1c462d2a64ba934372767cbb18449a70632ec65e90bb8
data/README.md CHANGED
@@ -22,6 +22,8 @@ Add the following to your Rakefile:
22
22
  require 'aptible/tasks'
23
23
  Aptible::Tasks.load_tasks
24
24
 
25
+ If you're running a Rails app, include the above lines after you load your application's tasks (e.g. `MyApp::Application.load_tasks`).
26
+
25
27
  ## Available Tasks
26
28
 
27
29
  | Task Name | Purpose |
data/Rakefile CHANGED
@@ -2,5 +2,3 @@ require 'bundler/gem_tasks'
2
2
 
3
3
  require 'aptible/tasks'
4
4
  Aptible::Tasks.load_tasks
5
-
6
- task default: :ci
@@ -10,9 +10,11 @@ module Aptible
10
10
  end
11
11
 
12
12
  def self.clear_task(task_name)
13
- if Rake::Task.tasks.map(&:name).include?(task_name.to_s)
14
- Rake::Task[task_name].clear
15
- end
13
+ Rake::Task[task_name].clear if task_defined?(task_name)
14
+ end
15
+
16
+ def self.task_defined?(task_name)
17
+ Rake::Task.tasks.map(&:name).include?(task_name.to_s)
16
18
  end
17
19
  end
18
20
  end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Tasks
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
@@ -0,0 +1,2 @@
1
+ Aptible::Tasks.clear_task :default
2
+ task default: :ci
@@ -1,11 +1,10 @@
1
1
  require 'rspec/core'
2
2
  require 'rspec/core/rake_task'
3
3
 
4
- # Clear any predefined :spec task
5
- Aptible::Tasks.clear_task(:spec)
6
-
7
- RSpec::Core::RakeTask.new(:spec) do |spec|
8
- spec.pattern = FileList['spec/**/*_spec.rb']
9
- spec.rspec_opts = '-c' # Color
10
- spec.rspec_opts << '-fd' # Format: Documentation
4
+ unless Aptible::Tasks.task_defined?(:spec)
5
+ RSpec::Core::RakeTask.new(:spec) do |spec|
6
+ spec.pattern = 'spec/**/*_spec.rb'
7
+ spec.rspec_opts = '-c' # Color
8
+ spec.rspec_opts << '-fd' # Format: Documentation
9
+ end
11
10
  end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'rake default' do
4
+ include_context 'rake'
5
+
6
+ its(:prerequisites) { should == ['ci'] }
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-29 00:00:00.000000000 Z
11
+ date: 2013-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -86,12 +86,14 @@ files:
86
86
  - lib/aptible/tasks/rubocop.rb
87
87
  - lib/aptible/tasks/version.rb
88
88
  - lib/tasks/ci.rake
89
+ - lib/tasks/default.rake
89
90
  - lib/tasks/rubocop.rake
90
91
  - lib/tasks/spec.rake
91
92
  - spec/aptible/tasks/rubocop_spec.rb
92
93
  - spec/shared/contexts/rake.rb
93
94
  - spec/spec_helper.rb
94
95
  - spec/tasks/ci_spec.rb
96
+ - spec/tasks/default_spec.rb
95
97
  - spec/tasks/rubocob_spec.rb
96
98
  - spec/tasks/spec_spec.rb
97
99
  homepage: https://github.com/aptible/aptible-tasks
@@ -114,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
116
  version: '0'
115
117
  requirements: []
116
118
  rubyforge_project:
117
- rubygems_version: 2.0.0
119
+ rubygems_version: 2.0.14
118
120
  signing_key:
119
121
  specification_version: 4
120
122
  summary: Shared Rake tasks for Aptible projects.
@@ -123,5 +125,6 @@ test_files:
123
125
  - spec/shared/contexts/rake.rb
124
126
  - spec/spec_helper.rb
125
127
  - spec/tasks/ci_spec.rb
128
+ - spec/tasks/default_spec.rb
126
129
  - spec/tasks/rubocob_spec.rb
127
130
  - spec/tasks/spec_spec.rb