text-interpolator 1.0.0 → 1.0.1
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 +8 -8
- data/CHANGES +9 -0
- data/lib/text_interpolator/text_interpolator.rb +1 -1
- data/lib/text_interpolator/version.rb +1 -1
- data/spec/text_interpolator_spec.rb +10 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGIxNTMzNDU2ODc3YmM2NDAzMmIyY2UzMzhmOWZjMDY5MjczNGQzZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDJhZmQwMjZmMjEwMjExMWQ4YTY1MDI3NTc3ZmFjNzU4MzgxYzc5OA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmE4YmYxN2JhNTYwMTBiYmFmZmM0MmY4ZDM2YTFhN2U2NjdlMDZjMjUyYjRh
|
10
|
+
YTkzMGZmYjg3Njk2M2NhODM0M2Q1NzBmY2NmMTgyYmJhZjEzMTEyMTVmYTA3
|
11
|
+
ODBmMWY0N2UyZTgyZDM5N2E0ZDhhZmE4YTQ0OGRlZjczOWZmNDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NThjZDg0MTI4NDU2YmNhMDQ2NGQzNWE2MDI1ZDhmMWE0M2NhZWIyNDgwNDUx
|
14
|
+
NzVmNTQzNGJlZGU4MjE2MGE2OTMzNWViMTgxM2NiNjhlOTAzODUzZjc5YzNm
|
15
|
+
ZDAyM2ZlYjgyNTg3MGVjOWE1Y2Y2YjFiNWVmNTI3NTQ4MjQ0Mzk=
|
data/CHANGES
ADDED
@@ -13,7 +13,7 @@ class TextInterpolator
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def interpolate_string string, env={}
|
16
|
-
string = string.gsub(
|
16
|
+
string = string.gsub(/\#{/, '%{') if string.index(/\#\{/)
|
17
17
|
|
18
18
|
string = interpolate_env_vars(string) if string.index('ENV[')
|
19
19
|
|
@@ -75,5 +75,15 @@ describe TextInterpolator do
|
|
75
75
|
expect(result[:dest_dir]).to eq '/usr/local/oracle/instantclient_11_2'
|
76
76
|
expect(result[:basic_zip]).to eq 'downloads/instantclient-basic-macos.x64-11.2.0.4.0.zip'
|
77
77
|
end
|
78
|
+
|
79
|
+
it "test" do
|
80
|
+
env = {:host=>"localhost", :user=>"ashvets", :home=>"/Users/ashvets", :ruby_home=>"/Users/ashvets/.rvm/rubies/ruby-1.9.3-p545", :oracle_base=>"/usr/local/oracle", :oracle_version=>"11.2.0.4.0", :ruby_oci_version=>"2.1.7", :tns_admin_dir=>"/usr/local/oracle/network/admin", :src_dir=>"downloads", :dest_dir=>"/usr/local/oracle/instantclient_11_2", :basic_zip=>"downloads/instantclient-basic-macos.x64-11.2.0.4.0.zip", :sdk_zip=>"downloads/instantclient-sdk-macos.x64-11.2.0.4.0.zip", :sqlplus_zip=>"downloads/instantclient-sqlplus-macos.x64-11.2.0.4.0.zip"}
|
81
|
+
|
82
|
+
s = "\necho \"Installing ruby-oci8 gem...\"\n\nORACLE_BASE=\"%{oracle_base}\"\nDYLD_LIBRARY_PATH=\"%{dest_dir}\"\nTNS_ADMIN=\"%{tns_admin_dir}\"\nNLS_LANG='.UTF8'\n\nENV_VARS=\"ORACLE_BASE=$ORACLE_BASE DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH TNS_ADMIN=$TNS_ADMIN NLS_LANG=$NLS_LANG\"\n\n%env $ENV_VARS bash -c 'gem install ruby-oci8 -v %{ruby_oci_version}'\n\n\n"
|
83
|
+
|
84
|
+
result = subject.interpolate s, env
|
85
|
+
|
86
|
+
p result
|
87
|
+
end
|
78
88
|
end
|
79
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: text-interpolator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Shvets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gemspec_deps_gen
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- .gitignore
|
48
48
|
- .ruby-gemset
|
49
49
|
- .ruby-version
|
50
|
+
- CHANGES
|
50
51
|
- Gemfile
|
51
52
|
- LICENSE
|
52
53
|
- README.md
|