lazyportal 0.0.4 → 0.0.6
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/Rakefile +0 -0
- data/bin/lazy +2 -2
- data/lazyportal.gemspec +2 -0
- data/lib/lazyportal/cli.rb +28 -3
- data/lib/lazyportal/helpers.rb +13 -0
- data/lib/lazyportal/tasks.rb +1 -1
- data/lib/lazyportal.rb +5 -7
- data/lib/{lazyportal/tasks.rake → tasks/lazy.rake} +3 -1
- metadata +17 -6
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -12
data/Rakefile
ADDED
File without changes
|
data/bin/lazy
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# Add lib to load path
|
4
4
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
|
@@ -6,4 +6,4 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
|
|
6
6
|
# Load lazyportal
|
7
7
|
require 'lazyportal'
|
8
8
|
|
9
|
-
Lazyportal::CLI.
|
9
|
+
Lazyportal::CLI.generate_rakefile
|
data/lazyportal.gemspec
CHANGED
data/lib/lazyportal/cli.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
module Lazyportal::CLI
|
2
2
|
|
3
|
-
def
|
3
|
+
def generate_rakefile
|
4
|
+
|
5
|
+
# Rakefile contents includes the Tasks
|
6
|
+
# module and loads lazy's tasks
|
4
7
|
tasks = %{
|
5
8
|
require 'rubygems'
|
6
9
|
require 'lazyportal'
|
@@ -9,10 +12,32 @@ include Lazyportal::Tasks
|
|
9
12
|
|
10
13
|
Lazyportal::Tasks.load_tasks
|
11
14
|
}
|
15
|
+
|
16
|
+
# Use existing Rakefile if one exists
|
17
|
+
rakefile = existing_rakefile.nil? ? "Rakefile" : existing_rakefile
|
18
|
+
|
19
|
+
# Append contents to existing Rakefile
|
20
|
+
# or generate a new Rakefile
|
21
|
+
create_file rakefile, tasks, :noclobber => true
|
22
|
+
|
23
|
+
# Print message to tell the user
|
24
|
+
# what happened
|
25
|
+
print_message
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
12
29
|
|
13
|
-
|
14
|
-
|
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"
|
15
36
|
end
|
16
37
|
end
|
38
|
+
|
39
|
+
def existing_rakefile
|
40
|
+
Dir["*"].select { |f| f.match /rakefile/i }[0]
|
41
|
+
end
|
17
42
|
|
18
43
|
end
|
data/lib/lazyportal/tasks.rb
CHANGED
data/lib/lazyportal.rb
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
module Lazyportal
|
2
2
|
|
3
|
-
|
4
|
-
VERSION = '0.0.4'
|
3
|
+
VERSION = '0.0.6'
|
5
4
|
|
6
5
|
end
|
7
6
|
|
8
|
-
#
|
7
|
+
# Load dependencies
|
9
8
|
require 'rake'
|
10
9
|
|
11
|
-
#
|
12
|
-
require 'rubygems'
|
13
|
-
|
14
|
-
# lazyportal
|
10
|
+
# Load lazyportal
|
15
11
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
|
16
12
|
|
13
|
+
require 'lazyportal/helpers'
|
17
14
|
require 'lazyportal/tasks'
|
18
15
|
require 'lazyportal/cli'
|
19
16
|
|
17
|
+
include Lazyportal::Helpers
|
20
18
|
include Lazyportal::Tasks
|
21
19
|
include Lazyportal::CLI
|
@@ -1,10 +1,12 @@
|
|
1
1
|
task :lazy do
|
2
|
+
puts ""
|
2
3
|
puts ' _ ____ ____ _ _ _____ ____ ____ '
|
3
4
|
puts ' / \ / _ \/_ \/ \/ \ /|/ __// ___\/ ___\ '
|
4
5
|
puts ' | | | / \| / /| || |\ ||| \ | \| \ '
|
5
6
|
puts ' | |_/\| |-||/ /_| || | \||| /_ \___ |\___ | '
|
6
7
|
puts ' \____/\_/ \|\____/\_/\_/ \|\____/\____/\____/ '
|
7
|
-
puts
|
8
|
+
puts ""
|
8
9
|
puts ' "The quality that makes you go to great effort '
|
9
10
|
puts ' to reduce overall energy expenditure."'
|
11
|
+
puts ""
|
10
12
|
end
|
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.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,19 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-04-
|
13
|
-
dependencies:
|
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
|
14
25
|
description:
|
15
26
|
email: jacob.d.lichner@gmail.com
|
16
27
|
executables:
|
@@ -18,15 +29,15 @@ executables:
|
|
18
29
|
extensions: []
|
19
30
|
extra_rdoc_files: []
|
20
31
|
files:
|
21
|
-
- Gemfile
|
22
|
-
- Gemfile.lock
|
23
32
|
- LICENSE.txt
|
33
|
+
- Rakefile
|
24
34
|
- README.md
|
25
35
|
- TODO.txt
|
26
36
|
- lib/lazyportal/cli.rb
|
27
|
-
- lib/lazyportal/
|
37
|
+
- lib/lazyportal/helpers.rb
|
28
38
|
- lib/lazyportal/tasks.rb
|
29
39
|
- lib/lazyportal.rb
|
40
|
+
- lib/tasks/lazy.rake
|
30
41
|
- lazyportal.gemspec
|
31
42
|
- bin/lazy
|
32
43
|
homepage:
|
data/Gemfile
DELETED