platform_sh_rails 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +29 -0
- data/.ruby-version +1 -1
- data/README.md +6 -6
- data/lib/platform_sh_rails/version.rb +1 -1
- data/lib/platform_sh_rails.rb +6 -7
- data/platform.gemspec +4 -3
- metadata +29 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34bad7aa4671b96d0b20381a736702a86e2076764f8c419970d73fb276b93ede
|
4
|
+
data.tar.gz: cfe0697b82cad3fc1170fbdc7c41d27c8a0a3dbf2eb7cc87351f2499cd1f78c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f88ba839c5d5ac1beeee7f1dc56003aca359848bcae65b3cff28dfb1f53234707c60dcd61654e4003f3a5292b682a5a082245619e59b5fd8913d4b90f845f5b2
|
7
|
+
data.tar.gz: 87004dac6b01f2c40b858f1ab8fb51b0a1009f5be9a12fde4dffee95c62d405ec1a7514c655b46732dae03202fde4629fe318144e7d560a5779b5d4f8b1742ac
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
matrix:
|
17
|
+
ruby: [2.4, 2.5, 2.6, 2.7, 3.0, 3.1]
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v2
|
21
|
+
- name: Set up Ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
bundler-cache: true
|
25
|
+
ruby-version: ${{ matrix.ruby }}
|
26
|
+
- name: Install dependencies
|
27
|
+
run: bundle install
|
28
|
+
- name: Run tests
|
29
|
+
run: bundle exec rake
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.2
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
# Platform.sh Rails Helper
|
1
|
+
# Platform.sh Rails Helper
|
2
|
+
|
2
3
|
platform_sh_rails is a helper gem to ease interacting with the environment of the Platform.sh PaaS on the Ruby on Rails Framework
|
3
4
|
|
4
5
|
See the platform_sh gem for vanilla ruby helper
|
@@ -31,25 +32,24 @@ This gem setups the environment for Rails, it will autoconfigure:
|
|
31
32
|
* Mongodb
|
32
33
|
* InfluxDB
|
33
34
|
|
34
|
-
The gem will autoconfigure rails to use the first service it finds. So if you just add this gem to
|
35
|
+
The gem will autoconfigure rails to use the first service it finds. So if you just add this gem to your Gemfile and push everything should work automagically. The configuration works by exporting environment variables with the expected names and URL structure.
|
35
36
|
|
36
37
|
If you have multiple services of the same type.. or multiple relational databases (like a postgres + a mysql) in your .platform/services file .. well you should configure by hand.
|
37
38
|
|
38
39
|
Also note that for ActiveRecord this will default to mysql2, but if you loaded the mysql Gem it should still work.
|
39
40
|
|
40
|
-
|
41
41
|
## Development
|
42
42
|
|
43
43
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
44
44
|
|
45
45
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
46
46
|
|
47
|
-
|
47
|
+
This gem depends on [platformsh-ruby-helper](https://github.com/platformsh/platformsh-ruby-helper).
|
48
48
|
|
49
|
-
|
49
|
+
## Contributing
|
50
50
|
|
51
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/platformsh/platformsh-rails-helper.
|
51
52
|
|
52
53
|
## License
|
53
54
|
|
54
55
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
55
|
-
|
data/lib/platform_sh_rails.rb
CHANGED
@@ -2,7 +2,7 @@ require "platform_sh_rails/version"
|
|
2
2
|
require "platform_sh"
|
3
3
|
|
4
4
|
module PlatformSHRails
|
5
|
-
# PlatformSH Railtie to load environment
|
5
|
+
# PlatformSH Railtie to load environment
|
6
6
|
class Railtie < Rails::Railtie
|
7
7
|
|
8
8
|
config.before_configuration do
|
@@ -13,13 +13,12 @@ module PlatformSHRails
|
|
13
13
|
PlatformSH::export_services_urls
|
14
14
|
end
|
15
15
|
if PlatformSH::on_platform? && PlatformSH::is_build_environment?
|
16
|
-
ENV['DB_ADAPTER']="nulldb"
|
16
|
+
ENV['DB_ADAPTER']="nulldb"
|
17
17
|
ENV['DATABASE_URL']="nulldb://localhost/nulldb?pool=5"
|
18
18
|
end
|
19
|
-
ENV['RAILS_SERVE_STATIC_FILES']
|
20
|
-
ENV['RAILS_LOG_TO_STDOUT']
|
21
|
-
ENV['SECRET_KEY_BASE']
|
19
|
+
ENV['RAILS_SERVE_STATIC_FILES'] ||= 'true'
|
20
|
+
ENV['RAILS_LOG_TO_STDOUT'] ||= "true"
|
21
|
+
ENV['SECRET_KEY_BASE'] ||= ENV['PLATFORM_PROJECT_ENTROPY']
|
22
22
|
end
|
23
|
-
|
24
23
|
end
|
25
|
-
end
|
24
|
+
end
|
data/platform.gemspec
CHANGED
@@ -19,9 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^bin/platform.*}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "platform_sh", "0.2
|
22
|
+
spec.add_dependency "platform_sh", "~> 0.2"
|
23
23
|
spec.add_dependency "activerecord-nulldb-adapter"
|
24
|
-
spec.add_development_dependency "bundler", "~>
|
25
|
-
spec.add_development_dependency "rake", "~>
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.2"
|
25
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
26
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "byebug", "~> 11.1"
|
27
28
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: platform_sh_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ori Pekelman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform_sh
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2
|
19
|
+
version: '0.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2
|
26
|
+
version: '0.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord-nulldb-adapter
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: byebug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '11.1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '11.1'
|
83
97
|
description: Platform.sh rails helper gem to ease interacting with the environment
|
84
98
|
email:
|
85
99
|
- ori@platform.sh
|
@@ -87,6 +101,7 @@ executables: []
|
|
87
101
|
extensions: []
|
88
102
|
extra_rdoc_files: []
|
89
103
|
files:
|
104
|
+
- ".github/workflows/ci.yml"
|
90
105
|
- ".gitignore"
|
91
106
|
- ".rspec"
|
92
107
|
- ".ruby-version"
|
@@ -104,7 +119,7 @@ homepage: https://platform.sh
|
|
104
119
|
licenses:
|
105
120
|
- MIT
|
106
121
|
metadata: {}
|
107
|
-
post_install_message:
|
122
|
+
post_install_message:
|
108
123
|
rdoc_options: []
|
109
124
|
require_paths:
|
110
125
|
- lib
|
@@ -119,8 +134,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
134
|
- !ruby/object:Gem::Version
|
120
135
|
version: '0'
|
121
136
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
123
|
-
signing_key:
|
137
|
+
rubygems_version: 3.2.22
|
138
|
+
signing_key:
|
124
139
|
specification_version: 4
|
125
140
|
summary: Platform.sh rails helper gem to ease interacting with the environment
|
126
141
|
test_files: []
|