ruby_storm 0.0.12 → 0.0.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d15153b99b083d3e2c8f183021c02d702c7f6816
4
- data.tar.gz: d28541a7b614bf9164449a7a46cdb4316a60e1bd
3
+ metadata.gz: 69a513ab30a7897dba6482a64012ab9ccff552c8
4
+ data.tar.gz: e5fa9152836bf1a9691e990f599487d8ae5a8fa9
5
5
  SHA512:
6
- metadata.gz: 8c68ca744edde8743a5fe522d4e4d14a968392251b0ae01419195d158b5a723841049c5b09799510e3cb1351f818e6ebea150cce28c5c57634ffbb213aa76963
7
- data.tar.gz: 76bad960dbc4d9451ae822c0c3610a2e771af626d7bb2ce7065b2ad19bb33ac9fb71cf74080ee968910e528a1a027c65193b91de42dc4084a0465700113cd070
6
+ metadata.gz: 1a62e948fbe98bdbb044f94f965f7e2135736d8490217635741411d7fa7dc98119d0d31e80e0890094dc1a1449ab3fcac61103e67cf263b2a00544d0de35586a
7
+ data.tar.gz: 4e16e2d5a3166b6fca05adb64ab86d8fd0b60d895d3dca8c3630413e89e4545f7c8da4c661b9cf1e354f1a1556d66466d860d41380d61603ac2e89c525f5be86
data/bin/storm CHANGED
@@ -29,14 +29,24 @@ module Storm
29
29
 
30
30
  def self.load_environment
31
31
  puts "Loading storm environment"
32
- require 'thread_safe'
33
32
  require 'active_record'
34
- require "awesome_print"
35
33
  require 'bundler'
34
+ require 'awesome_print'
36
35
  ::Bundler.require(:default, :development)
37
36
  Dir["./**/*.rb"].each{|file| next if /db\// =~ file; require file }
38
37
  end
39
38
 
39
+ def self.connect
40
+ ActiveRecord::Base.establish_connection YAML.load_file('./db/database.yml')[Storm::STORM_ENV]
41
+ begin
42
+ require 'pry'
43
+ Pry.color = true
44
+ Pry.config.print = proc { |output, value| output.puts "=> #{value.ai}" }
45
+ rescue Exception => e
46
+ puts e
47
+ end
48
+ end
49
+
40
50
  def self.generator(names)
41
51
  generators_and_paths = names.map{|name|
42
52
  [name.capitalize,name.downcase]
data/generators/app.rb CHANGED
@@ -3,6 +3,7 @@ require 'fileutils'
3
3
  module Storm
4
4
  class App
5
5
  def self.start(args)
6
+ Storm::connect
6
7
  project_name = File.basename(Dir.pwd)
7
8
  class_name = Inflector::classify(project_name)
8
9
  Inflector::constantize(class_name).send(ARGV[1], ARGV[2..-1])
@@ -7,14 +7,11 @@ module Storm
7
7
  end
8
8
 
9
9
  def self.start(*args)
10
- ActiveRecord::Base.establish_connection YAML.load_file('./db/database.yml')[Storm::STORM_ENV]
10
+ Storm::connect
11
11
  ARGV.clear
12
12
  begin
13
- require 'pry'
14
- Pry.color = true
15
- Pry.config.print = proc { |output, value| output.puts "=> #{value.ai}" }
16
13
  load Gem.bin_path('pry', 'pry')
17
- rescue Exception => e
14
+ rescue Exception
18
15
  if @@reload
19
16
  @@reload = false
20
17
  self.start(*args)
data/generators/start.rb CHANGED
@@ -3,7 +3,7 @@ require 'fileutils'
3
3
  module Storm
4
4
  class Start
5
5
  def self.start(args)
6
-
6
+ Storm::connect
7
7
  project_name = File.basename(Dir.pwd)
8
8
  puts "Loading project [#{project_name}]"
9
9
 
@@ -1,7 +1,7 @@
1
1
  module Storm
2
2
  class Version
3
3
  def self.to_s(*args)
4
- "0.0.12"
4
+ "0.0.13"
5
5
  end
6
6
 
7
7
  def self.start(*args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_storm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wouter Coppieters