rubypitaya 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 308569ffd1a21f885317d944646e19c7f95159c4c64b900c3fc89bc5bca2321c
4
- data.tar.gz: 4f89dc81fbc999187538019916121cef7d982dafd88edca1fe665518c4c9225b
3
+ metadata.gz: 47e0970be5b8e403375046ab301bf90738610d336c94942e29512c54d9100d36
4
+ data.tar.gz: 3d5ca8e24fc63223516723a6db06f85a3f0228bde29a58f88187675bdf82e78c
5
5
  SHA512:
6
- metadata.gz: f6a6ce18e3c2ff2afb15b1408edd05c2c9ac6920807360d21f1a2e24fc4f68912b5eabf9cf023ec873962150f7547948dab9c039b88febd0493d151fd0a27c04
7
- data.tar.gz: 1d0272741a51cea4cd1253185ede2d3c6cbef88a328d4562eacfdc9a9269f96d0af817d51898f9ee154a3428c18aec69768e0fdbb0f27c01ea7372076ebed0a9
6
+ metadata.gz: 39246abfef21adb49e4434f7500d7577998e061a7f735ea3d394b3d7ffded21a6a95394146dbd29abd7dce45300ea1c3c8db7ebe9bf7b9657bef1b75a2b40b3c
7
+ data.tar.gz: b1de3be06e60907f611e2dce20161f02a1aaf5cf98a97b4c3330859cbb8d8266d572bde3c16f459612a0ecc8f6b4414dbc9918ddcea3c5e2562d30e4f4471e8e
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'rubypitaya', '1.3.0'
3
+ gem 'rubypitaya', '1.3.1'
4
4
 
5
5
  group :development do
6
6
  gem 'pry', '0.12.2'
@@ -62,7 +62,7 @@ GEM
62
62
  diff-lcs (>= 1.2.0, < 2.0)
63
63
  rspec-support (~> 3.8.0)
64
64
  rspec-support (3.8.3)
65
- rubypitaya (1.3.0)
65
+ rubypitaya (1.3.1)
66
66
  activerecord (= 6.0.2)
67
67
  etcdv3 (= 0.10.2)
68
68
  eventmachine (= 1.2.7)
@@ -85,7 +85,7 @@ DEPENDENCIES
85
85
  pry (= 0.12.2)
86
86
  rake (= 10.0)
87
87
  rspec (= 3.8.0)
88
- rubypitaya (= 1.3.0)
88
+ rubypitaya (= 1.3.1)
89
89
 
90
90
  BUNDLED WITH
91
91
  1.17.2
@@ -40,6 +40,7 @@ namespace :db do
40
40
  connection_data = database_config.connection_data_without_database
41
41
 
42
42
  ActiveRecord::Base.establish_connection(connection_data)
43
+ ActiveRecord::Base.connection.select_all "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname='#{database_config.database_name}' AND pid <> pg_backend_pid();"
43
44
  ActiveRecord::Base.connection.drop_database(database_config.database_name)
44
45
  ActiveRecord::Base.connection.close
45
46
 
@@ -7,16 +7,24 @@ require 'rubypitaya'
7
7
  require 'rubypitaya/core/database_config'
8
8
 
9
9
  environment_name = ENV.fetch("RUBYPITAYA_ENV") { 'development' }
10
- database_config = DatabaseConfig.new(environment_name, Path::DATABASE_CONFIG_PATH)
10
+ database_config = RubyPitaya::DatabaseConfig.new(environment_name, RubyPitaya::Path::DATABASE_CONFIG_PATH)
11
11
  ActiveRecord::Base.establish_connection(database_config.connection_data)
12
12
  ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT)
13
13
  ActiveSupport::LogSubscriber.colorize_logging = true
14
14
 
15
15
  Gem.find_files('rubypitaya/**/*.rb').each do |path|
16
- require path unless path.end_with?('spec.rb') || path.include?('db/migrate')
16
+ require path unless path.end_with?('spec.rb') ||
17
+ path.include?('db/migrate') ||
18
+ path.include?('app-template')
19
+ end
20
+
21
+ app_files_path = File.join(RubyPitaya::Path::APP_FOLDER_PATH, '**/*.rb')
22
+ Dir[app_files_path].each do |path|
23
+ require path unless path.end_with?('spec.rb') ||
24
+ path.include?('db/migrate')
17
25
  end
18
26
 
19
27
  require 'irb'
20
28
  IRB.start(__FILE__)
21
29
 
22
- ActiveRecord::Base.connection.close
30
+ ActiveRecord::Base.connection.close
@@ -1,4 +1,4 @@
1
1
  module RubyPitaya
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubypitaya
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luciano Prestes Cavalcanti