ruby_storm 0.0.14 → 0.0.15

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: ca1096dd9aad25ec2eba3a72b44cfc4c7bbb6613
4
- data.tar.gz: fb71dda0b941b6647e150c85714aeea08e7c4edb
3
+ metadata.gz: 89fc51ed11eeceb54c8424e38e84249bb9fe4232
4
+ data.tar.gz: 6cceee4079cd876d8a35e49d51e8a780dcdc48c1
5
5
  SHA512:
6
- metadata.gz: 86dfdbdd490d2ccf1af0b3855ada9232382c548554a0148041d134543e75f4ab175ffbfb4a485f4cfc9ecc360292cfea3ed960892d9366be9e1de6f0216585b6
7
- data.tar.gz: c0bf420a55b9af51f6adf1f3528b31937cb5cf863793ab39a7ad189d6cfb52a843bb028c6b0829393ef618ae179645225252b6508c801831a8d798edab8b4f11
6
+ metadata.gz: 0a22ad0f0006a67db229e82f020e58c6ef1f0e2098bf228744c76befe77e6c83e9168a64ad017b6e9dbf04880c587c8ad3ccc4de31e9711d7c5ef844b13b9086
7
+ data.tar.gz: defcb2784d7a8e15ffe53a2545e0e907c65a7475490690c9ce28c86f44ca45809c98580e90b2b80206a5832ba43d71f4666df109f71fe8cf2ed88fc94242ff61
data/Gemfile.lock CHANGED
@@ -17,22 +17,9 @@ GEM
17
17
  arel (6.0.0)
18
18
  awesome_print (1.6.1)
19
19
  builder (3.2.2)
20
- byebug (4.0.2)
21
- columnize (= 0.9.0)
22
- coderay (1.1.0)
23
- columnize (0.9.0)
24
20
  i18n (0.7.0)
25
21
  json (1.8.2)
26
- method_source (0.8.2)
27
22
  minitest (5.5.1)
28
- pry (0.10.1)
29
- coderay (~> 1.1.0)
30
- method_source (~> 0.8.1)
31
- slop (~> 3.4)
32
- pry-byebug (3.1.0)
33
- byebug (~> 4.0)
34
- pry (~> 0.10)
35
- slop (3.6.0)
36
23
  sqlite3 (1.3.10)
37
24
  thread_safe (0.3.5)
38
25
  tzinfo (1.2.2)
@@ -44,7 +31,5 @@ PLATFORMS
44
31
  DEPENDENCIES
45
32
  activerecord
46
33
  awesome_print
47
- pry (~> 0.10.0)
48
- pry-byebug
49
34
  sqlite3
50
35
  thread_safe
@@ -4,7 +4,7 @@ require_relative '../generators/version'
4
4
 
5
5
  module Storm
6
6
  STORM_DIR = File.expand_path("#{File.dirname(__FILE__)}/../")
7
- STORM_ENV = ENV['DATABASE_ENV'] || 'development'
7
+ STORM_ENV = ENV['ENV'] || 'development'
8
8
  DB_VERSION = ENV['DB_VERSION'] || nil
9
9
  DATABASE_DIR = ENV['DATABASE_DIR'] || './db'
10
10
  APP_NAME = ENV['APP_NAME'] || Inflector::classify(File.basename(FileUtils.pwd))
@@ -12,7 +12,11 @@ module Storm
12
12
  APP_DIR = File.expand_path("./")
13
13
 
14
14
  def self.env
15
- STORM_ENV
15
+ @@env ||= STORM_ENV
16
+ end
17
+
18
+ def self.env=(value)
19
+ @@env = value
16
20
  end
17
21
 
18
22
  def self.version
@@ -22,4 +26,8 @@ module Storm
22
26
  def self.app_name
23
27
  APP_NAME
24
28
  end
29
+
30
+ def self.db_config
31
+ ::YAML.load_file('./db/database.yml')[Storm.env.to_s]
32
+ end
25
33
  end
data/bin/storm CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'thread_safe'
3
-
4
3
  module Storm
5
4
 
6
5
  require File.expand_path("./../../vendor/inflector", __FILE__)
@@ -3,7 +3,7 @@ class Storm::DBCommand
3
3
  require 'yaml'
4
4
 
5
5
  def self.config
6
- @config ||= ::YAML.load_file('./db/database.yml')[Storm::STORM_ENV]
6
+ @config ||= Storm::db_config
7
7
  end
8
8
 
9
9
  def self.postgres?
@@ -1,7 +1,7 @@
1
1
  module Storm
2
2
  class Version
3
3
  def self.to_s(*args)
4
- "0.0.14"
4
+ "0.0.15"
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.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wouter Coppieters