lazyportal 0.0.6 → 0.0.8

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.
data/lazyportal.gemspec CHANGED
@@ -11,6 +11,4 @@ Gem::Specification.new do |s|
11
11
 
12
12
  s.executables = [ 'lazy' ]
13
13
  s.files = FileList[ '[A-Z]*', 'lib/**/*', 'lazyportal.gemspec' ]
14
-
15
- s.add_dependency('sass', '3.1.0.alpha.256')
16
14
  end
@@ -1,43 +1,46 @@
1
- module Lazyportal::CLI
1
+ module Lazyportal
2
+ module CLI
2
3
 
3
- def generate_rakefile
4
+ def generate_rakefile
4
5
 
5
- # Rakefile contents includes the Tasks
6
- # module and loads lazy's tasks
7
- tasks = %{
8
- require 'rubygems'
9
- require 'lazyportal'
6
+ # Rakefile contents includes the Tasks
7
+ # module and loads lazy's tasks
8
+ tasks = %{
9
+ require 'rubygems'
10
+ require 'lazyportal'
10
11
 
11
- include Lazyportal::Tasks
12
+ include Lazyportal::Tasks
12
13
 
13
- Lazyportal::Tasks.load_tasks
14
- }
14
+ Lazyportal::Tasks.load_tasks
15
+ }
15
16
 
16
- # Use existing Rakefile if one exists
17
- rakefile = existing_rakefile.nil? ? "Rakefile" : existing_rakefile
17
+ # Use existing Rakefile if one exists
18
+ rakefile = existing_rakefile.nil? ? "Rakefile" : existing_rakefile
18
19
 
19
- # Append contents to existing Rakefile
20
- # or generate a new Rakefile
21
- create_file rakefile, tasks, :noclobber => true
20
+ # Append contents to existing Rakefile
21
+ # or generate a new Rakefile
22
+ create_file rakefile, tasks, :noclobber => true
22
23
 
23
- # Print message to tell the user
24
- # what happened
25
- print_message
26
- end
24
+ # Print message to tell the user
25
+ # what happened
26
+ print_message
27
+ end
27
28
 
28
- private
29
+ private
29
30
 
30
- def print_message
31
- if existing_rakefile.nil?
32
- puts "lazy generated a new Rakefile"
33
- puts "type rake -T to see available tasks"
34
- else
35
- puts "lazy tasks were appended to existing Rakefile"
31
+ def print_message
32
+ if existing_rakefile.nil?
33
+ puts "lazy generated a new Rakefile"
34
+ puts "type rake -T to see available tasks"
35
+ else
36
+ puts "lazy tasks were appended to existing Rakefile"
37
+ end
36
38
  end
37
- end
38
39
 
39
- def existing_rakefile
40
- Dir["*"].select { |f| f.match /rakefile/i }[0]
41
- end
40
+ def existing_rakefile
41
+ pwd = `echo $PWD`.chomp
42
+ Dir[pwd + "/*"].select { |f| f.match /rakefile/i }[0]
43
+ end
42
44
 
45
+ end
43
46
  end
@@ -1,13 +1,15 @@
1
- module Lazyportal::Helpers
1
+ module Lazyportal
2
+ module Helpers
2
3
 
3
- def create_file file, contents, modes={}
4
- mode = case modes
5
- when :noclobber then "a+"
6
- when :read_only then "r"
7
- else "w+"
8
- end
4
+ def create_file file, contents, modes={}
5
+ mode = case modes
6
+ when :noclobber then "a+"
7
+ when :read_only then "r"
8
+ else "w+"
9
+ end
9
10
 
10
- File.open(file, mode) { |f| f.write(contents) }
11
- end
11
+ File.open(file, mode) { |f| f.write(contents) }
12
+ end
12
13
 
14
+ end
13
15
  end
File without changes
@@ -1,7 +1,9 @@
1
- module Lazyportal::Tasks
1
+ module Lazyportal
2
+ module Tasks
2
3
 
3
- def load_tasks
4
- Dir[File.dirname(__FILE__) + "/tasks/**/*.rake"].each { |f| load f }
4
+ def load_tasks
5
+ Dir[File.dirname(__FILE__) + "/tasks/**/*.rake"].each { |f| load f }
6
+ end
7
+
5
8
  end
6
-
7
9
  end
data/lib/lazyportal.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Lazyportal
2
2
 
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.8'
4
4
 
5
5
  end
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazyportal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,18 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2011-04-23 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: sass
16
- requirement: &2156021560 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - =
20
- - !ruby/object:Gem::Version
21
- version: 3.1.0.alpha.256
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: *2156021560
13
+ dependencies: []
25
14
  description:
26
15
  email: jacob.d.lichner@gmail.com
27
16
  executables:
@@ -35,9 +24,9 @@ files:
35
24
  - TODO.txt
36
25
  - lib/lazyportal/cli.rb
37
26
  - lib/lazyportal/helpers.rb
27
+ - lib/lazyportal/tasks/lazy.rake
38
28
  - lib/lazyportal/tasks.rb
39
29
  - lib/lazyportal.rb
40
- - lib/tasks/lazy.rake
41
30
  - lazyportal.gemspec
42
31
  - bin/lazy
43
32
  homepage: