sinatra-cl 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/files/build.rb CHANGED
@@ -37,7 +37,7 @@ module Sinatra
37
37
 
38
38
  def top_level
39
39
 
40
- file_constant_generator.each do |const|
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
- no_bootstrap_file_constant_generator.each do |const|
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
- boostrap_file_constant_generator.each do |const|
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
@@ -5,8 +5,7 @@ module Sinatra
5
5
  def self.build(app_name)
6
6
  File.open("#{app_name}/views/index.erb", "w+") { |io|
7
7
  io << <<-END
8
- <h1>classy</h1>
9
- <h2>as fuck</h2>
8
+ <h1>So. Classy.</h1>
10
9
  END
11
10
  }
12
11
  end
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module Cl
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
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.3
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: