bundle-try 1.6.1 → 1.6.2
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 +4 -4
- data/CHANGELOG.md +13 -0
- data/bundle-try.gemspec +1 -1
- data/lib/bundle-try.rb +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bb1f59a4408dbc79daa4590aa8a1667e1813e2f
|
4
|
+
data.tar.gz: d9096f712e2de48bb8b0aa5f00bd17ce4ddf6f9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e1c378aec0d7ca1e52273c751cfef76a94a5c3b9a0ed6beec4f658f0f114fd866380f04871132820a3ccf3e9dd799e1e247bfaa57e5961237f1bcaddd71980d
|
7
|
+
data.tar.gz: f1fed4dba5ba984aaf47a89de954278a3a8dd39c760e0bdec7d97d2fe07102efdbfcb8892f25f97eb9e1aeab139b067fc10ce57db1183baf3eb1521a4aec4e1a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## 1.6.2
|
2
|
+
|
3
|
+
### Added
|
4
|
+
|
5
|
+
* add requires for some gems `rails`, `activesupport` and `activerecord` that have a "name-require-mismatch" (i.e. gem `activerecord` should be required as `active_record`).
|
6
|
+
So no more require, but right to the action!:
|
7
|
+
|
8
|
+
$ bundle try activesupport
|
9
|
+
irb> Date.today.beginning_of_week
|
10
|
+
|
11
|
+
$ DATABASE_URL='sqlite3::memory:' bundle try rails sqlite3
|
12
|
+
irb> ActiveRecord::Base.establish_connection
|
13
|
+
|
1
14
|
## 1.6.1
|
2
15
|
|
3
16
|
### Fixed
|
data/bundle-try.gemspec
CHANGED
data/lib/bundle-try.rb
CHANGED
@@ -19,6 +19,12 @@ module BundleTry
|
|
19
19
|
end
|
20
20
|
|
21
21
|
class Gemline
|
22
|
+
REQUIREMENTS = {
|
23
|
+
'rails' => %w(rails/all active_support/all),
|
24
|
+
'activerecord' => %w(active_record),
|
25
|
+
'activesupport' => %w(active_support/all),
|
26
|
+
}.freeze
|
27
|
+
|
22
28
|
attr_reader :versionlike, :namelike
|
23
29
|
|
24
30
|
def initialize(namelike, versionlike = nil)
|
@@ -64,6 +70,10 @@ module BundleTry
|
|
64
70
|
namelike[/(?:github\.com\/|gh:)(?:(.*)\.git|(.*))$/]
|
65
71
|
$1 || $2
|
66
72
|
end
|
73
|
+
|
74
|
+
def requires
|
75
|
+
REQUIREMENTS[name].inspect if REQUIREMENTS[name]
|
76
|
+
end
|
67
77
|
end
|
68
78
|
|
69
79
|
class Gemfile < Mustache
|
@@ -73,13 +83,13 @@ source "https://rubygems.org"
|
|
73
83
|
|
74
84
|
{{#gemlines}}
|
75
85
|
{{#github?}}
|
76
|
-
gem '{{ name }}', :github => '{{ github }}'{{#ref}}, :ref => '{{ref}}'{{/ref}}
|
86
|
+
gem '{{ name }}', :github => '{{ github }}'{{#ref}}, :ref => '{{ref}}'{{/ref}}{{#requires}}, :require => {{{requires}}}{{/requires}}
|
77
87
|
{{/github?}}
|
78
88
|
{{#gist?}}
|
79
89
|
gem '{{ name }}', :gist => '{{ gist }}'{{#ref}}, :ref => '{{ref}}'{{/ref}}
|
80
90
|
{{/gist?}}
|
81
91
|
{{#regular?}}
|
82
|
-
gem '{{ name }}'{{#versionlike}}, '{{{ versionlike }}}'{{/versionlike}}
|
92
|
+
gem '{{ name }}'{{#versionlike}}, '{{{ versionlike }}}'{{/versionlike}}{{#requires}}, :require => {{{requires}}}{{/requires}}
|
83
93
|
{{/regular?}}
|
84
94
|
{{/gemlines}}
|
85
95
|
template
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundle-try
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gert Goet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|