sinatra-cl 0.1.3 → 0.1.4
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/lib/files/build.rb +3 -30
- data/lib/files/index.rb +1 -2
- data/lib/sinatra-cl/version.rb +1 -1
- data/sinatra-cl.gemspec +1 -0
- metadata +3 -2
data/lib/files/build.rb
CHANGED
@@ -37,7 +37,7 @@ module Sinatra
|
|
37
37
|
|
38
38
|
def top_level
|
39
39
|
|
40
|
-
|
40
|
+
[App,Gemfile,Index,Model,Rakefile,Readme].each do |const|
|
41
41
|
const.build(app_name)
|
42
42
|
end
|
43
43
|
|
@@ -47,36 +47,17 @@ module Sinatra
|
|
47
47
|
|
48
48
|
|
49
49
|
def no_bootstrap_files
|
50
|
-
|
50
|
+
[LayoutNoBs].each do |const|
|
51
51
|
const.build(app_name)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
55
|
def boostrap_files
|
56
|
-
|
56
|
+
[Bootstrap, BootstrapJs,BootstrapResponsive,Custom,GlyphiconsHalflings,GlyphiconsHalflingsWhite,Layout].each do |const|
|
57
57
|
const.build(app_name)
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
def file_constant_generator
|
62
|
-
FileList.new("./lib/files/*.rb").map do |file|
|
63
|
-
const = my_constantize("Sinatra::Cl::Files::" << file.pathmap("%n").split("_").map{|x| x.capitalize}.join(""))
|
64
|
-
const unless const == Build
|
65
|
-
end.compact
|
66
|
-
end
|
67
|
-
|
68
|
-
def boostrap_file_constant_generator
|
69
|
-
FileList.new("./lib/files/bootstrap/*.rb").map do |file|
|
70
|
-
my_constantize("Sinatra::Cl::Files::" << file.pathmap("%n").split("_").map{|x| x.capitalize}.join(""))
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
def no_bootstrap_file_constant_generator
|
75
|
-
FileList.new("./lib/files/no-boostrap/*.rb").map do |file|
|
76
|
-
my_constantize("Sinatra::Cl::Files::" << file.pathmap("%n").split("_").map{|x| x.capitalize}.join(""))
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
61
|
def config
|
81
62
|
File.open("#{app_name}/config.ru", "w+") { |io|
|
82
63
|
io << "require File.join(File.dirname(__FILE__), 'app.rb')\nrun #{app_name.capitalize}::App"
|
@@ -89,14 +70,6 @@ module Sinatra
|
|
89
70
|
}
|
90
71
|
end
|
91
72
|
|
92
|
-
def my_constantize(class_name)
|
93
|
-
unless /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ =~ class_name
|
94
|
-
raise NameError, "#{class_name.inspect} is not a valid constant name!"
|
95
|
-
end
|
96
|
-
|
97
|
-
Object.module_eval("::#{$1}", __FILE__, __LINE__)
|
98
|
-
end
|
99
|
-
|
100
73
|
end
|
101
74
|
end
|
102
75
|
end
|
data/lib/files/index.rb
CHANGED
data/lib/sinatra-cl/version.rb
CHANGED
data/sinatra-cl.gemspec
CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.description = "This uses Ashley William's ratpack setup to scaffold a sinatra app"
|
12
12
|
gem.summary = "This is a test"
|
13
13
|
gem.homepage = ""
|
14
|
+
gem.license = 'MIT'
|
14
15
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
16
17
|
gem.executables = ["sinatra-cl"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-cl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -63,7 +63,8 @@ files:
|
|
63
63
|
- sinatra-cl.gemspec
|
64
64
|
- test/flag_test.rb
|
65
65
|
homepage: ''
|
66
|
-
licenses:
|
66
|
+
licenses:
|
67
|
+
- MIT
|
67
68
|
post_install_message:
|
68
69
|
rdoc_options: []
|
69
70
|
require_paths:
|