rake_tasks 4.0.0 → 4.1.0

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: a735e4f7394b774d26d49a3c99b942497f69d3b0
4
- data.tar.gz: 932919582970123b8a013cbfd48e3bf4bb2e8b89
3
+ metadata.gz: c90af3be60e3003c11749519856d65f56a1292ed
4
+ data.tar.gz: 0d41cd63fbc94d9fd4e9c833d9ac33121e617c30
5
5
  SHA512:
6
- metadata.gz: 5158805f5e03073acfaba39a20b1b6a2f3bbc3e0240ea9348b85976d41b080032dfe21679180a401ba91b00291a45ff845d2ebfaeaf381b8ebde05b1e5698798
7
- data.tar.gz: 9a2c62eccec2e708f6393218cfce6824b44d7c88429d059e7f0276f4083b72efe36b6796ab1634004699aee0cbd57586c477e6061dfa7e2aac510df7e15fbe00
6
+ metadata.gz: 9daf4c90a246eed53874d27acc28d4693106286cf4877b2aa8b14b96e1be763c29224bc28d53b3b241af2cd25e069b57cbf47a6c03c4146ea8f4612931272c83
7
+ data.tar.gz: 3ed782a73162f451a83fc5e9c234ac57bfc723e3894fee1c04df4642fbea0f0ce1916e972a6c5ac4c3d2803418e59564dd974090d872b73e34debef98728d916
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,37 @@
1
+ module RakeTasks
2
+ module Console
3
+ extend self
4
+
5
+ def run
6
+ System.system "bundle exec irb -Ilib -r#{lib_folder}"
7
+ end
8
+
9
+ def lib_folder
10
+ return @lib_folder if defined?(@lib_folder)
11
+
12
+ @lib_folder = nil
13
+ System.dir_glob('lib/*').each do |lib_item|
14
+ if System.directory?(lib_item) && System.file?("#{lib_item}.rb")
15
+ @lib_folder = File.basename(lib_item)
16
+ break
17
+ end
18
+ end
19
+
20
+ return @lib_folder
21
+ end
22
+
23
+ def foo
24
+ lib = nil
25
+ Dir['lib/*'].each do |lib_item|
26
+ if File.directory?(lib_item) && File.file?("#{lib_item}.rb")
27
+ lib = File.basename(lib_item)
28
+ break
29
+ end
30
+ end
31
+ end
32
+
33
+ def bar
34
+ system "bundle exec irb -Ilib -r#{lib}"
35
+ end
36
+ end
37
+ end
@@ -3,6 +3,10 @@ module RakeTasks
3
3
  extend Rake::DSL
4
4
  extend self
5
5
 
6
+ def system(*args)
7
+ Kernel.system(*args)
8
+ end
9
+
6
10
  def dir(*glob)
7
11
  Dir[*glob]
8
12
  end
@@ -0,0 +1,7 @@
1
+ if RakeTasks::Console.lib_folder
2
+ desc "Start a console " +
3
+ "with the #{RakeTasks::Console.lib_folder} environment loaded"
4
+ task :console do
5
+ RakeTasks::Console.run
6
+ end
7
+ end
data/rake_tasks.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rake_tasks'
3
- s.version = '4.0.0'
3
+ s.version = '4.1.0'
4
4
 
5
5
  s.summary = 'Basic rake tasks. You know you want some.'
6
6
  s.description =%Q{
data/rakefile CHANGED
@@ -10,6 +10,7 @@ require_relative 'lib/rake_tasks'
10
10
  'spec',
11
11
  'test',
12
12
  'checksum',
13
+ 'console',
13
14
  ].each do |task|
14
15
  require_relative File.join('lib/rake_tasks/tasks', task)
15
16
  end
data/readme.markdown CHANGED
@@ -31,7 +31,7 @@ Install RakeTasks at the command prompt if you haven't yet:
31
31
 
32
32
  Require the gem in your Gemfile:
33
33
 
34
- gem 'rake\_tasks', '~> 4.0.0'
34
+ gem 'rake\_tasks', '~> 4.1.0'
35
35
 
36
36
  Require the gem wherever you need to use it:
37
37
  (This will load any \*.rake files in your project.)
@@ -42,6 +42,7 @@ Require the tasks that you want to use:
42
42
 
43
43
  require 'rake\_tasks\tasks\spec' # Run RSpec specs of different types
44
44
  require 'rake\_tasks\tasks\cane' # Cane rake tasks
45
+ require 'rake\_tasks\tasks\console' # Load a library project in irb.
45
46
  require 'rake\_tasks\tasks\gem' # Gem build, install, deploy, etc.
46
47
  require 'rake\_tasks\tasks\checksum' # Generate a checksum for \*.gem file
47
48
  require 'rake\_tasks\tasks\doc' # Generate readme
@@ -56,6 +57,13 @@ Additional rake tasks will be found and loaded
56
57
  if they are named \*.rake (as of 3.0.0)
57
58
  and reside in either `lib\tasks` or `tasks` (as of 4.0.0).
58
59
 
60
+ ### Console Task
61
+
62
+ #### Requirements
63
+
64
+ This task looks for a folder under `lib` with a ruby (.rb extension) file
65
+ of the same name.
66
+
59
67
 
60
68
  ### Cane Tasks
61
69
 
@@ -125,6 +133,8 @@ this value will be saved to `~/.gem/credentials`.
125
133
  Updates
126
134
  -------
127
135
 
136
+ 4.1.0 Added console task.
137
+
128
138
  4.0.0 Added gem:push.
129
139
 
130
140
  Added spec, spec:features, spec:api, spec:integration, and spec:unit.
@@ -182,6 +192,7 @@ Updates
182
192
  - ruby: 1.9.3
183
193
  gemset: my\_gem\_test
184
194
 
195
+
185
196
  Additional Documentation
186
197
  ------------------------
187
198
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Herrick
@@ -30,7 +30,7 @@ cert_chain:
30
30
  dFfJVAFuyqXRLmrl1YroL9qLu8nKUUiKEcrRbc44Bd84Ti0VdHms+c7SZXqW+VUV
31
31
  kMsvl643w+TJ2BmsFnWZ4JMvHdZ8oQ==
32
32
  -----END CERTIFICATE-----
33
- date: 2015-02-17 00:00:00.000000000 Z
33
+ date: 2015-04-05 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: gems
@@ -131,6 +131,7 @@ extra_rdoc_files:
131
131
  files:
132
132
  - Gemfile
133
133
  - lib/rake_tasks.rb
134
+ - lib/rake_tasks/console.rb
134
135
  - lib/rake_tasks/core.rb
135
136
  - lib/rake_tasks/dependency.rb
136
137
  - lib/rake_tasks/doc.rb
@@ -139,6 +140,7 @@ files:
139
140
  - lib/rake_tasks/system.rb
140
141
  - lib/rake_tasks/tasks/cane.rb
141
142
  - lib/rake_tasks/tasks/checksum.rb
143
+ - lib/rake_tasks/tasks/console.rb
142
144
  - lib/rake_tasks/tasks/doc.rb
143
145
  - lib/rake_tasks/tasks/gem.rb
144
146
  - lib/rake_tasks/tasks/rdoc.rb
metadata.gz.sig CHANGED
Binary file