smartystreets_ruby_sdk 5.4.0 → 5.5.0

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
  SHA256:
3
- metadata.gz: a6620f522e7b7ed852250ec99f91287f726a7b9fa40f407a32ac53aac989cdef
4
- data.tar.gz: f929603cdce28a3053dbea384518dbed6ff397b86b0b57b7122dcd2efa8a5363
3
+ metadata.gz: 531a6c8c4f8c7cb86bb6e3c427b8bd0fb0696000b6b0f830b01c35432ac619b2
4
+ data.tar.gz: 2cb529c4fabea640eaba0e1fc5f9e6c152b0b96861c9df5950f62764229d036f
5
5
  SHA512:
6
- metadata.gz: ce1326377221d9d8941128d5ce1fd58c181e32b837182e3328f86526e5a9ff838fb4a7f09f9dad6dba701c887682058408bf1830b5e0aad55721669841598dde
7
- data.tar.gz: e2ee13a493c117e5db1976ce0dd159ec18af9464ef47aa3e506644214a2d2d515c39edaf7201e501a6103e43af21fe0a1b5313e9b0ce3d209354d5e5080a3ff1
6
+ metadata.gz: bb15454cd35247568f882b095a475cdd083a2de41e202842e84b5694a91ec0504c4858a6603c21bf25bbe21a89ef4598dc7c9427f1f97c6887e5c238b0793425
7
+ data.tar.gz: 2b2fb2e7b3e7b796eaa49136c2773df65a51e99988a1899e76677b5ce2cf7d6734751a23185037929ff6727a74301a7c4473cf56cfb0ff8da07fa93316e23a76
data/.gitignore CHANGED
@@ -2,4 +2,3 @@
2
2
  .idea
3
3
  coverage
4
4
  *.gem
5
- .vagrant/machines/default/virtualbox
data/Dockerfile ADDED
@@ -0,0 +1,6 @@
1
+ FROM ruby:alpine
2
+
3
+ COPY . /code
4
+ WORKDIR /code
5
+
6
+ RUN apk add -U make git && make dependencies
data/Makefile CHANGED
@@ -1,19 +1,45 @@
1
1
  #!/usr/bin/make -f
2
2
 
3
+ SOURCE_VERSION := 5.5
4
+ VERSION_FILE = lib/smartystreets_ruby_sdk/version.rb
5
+ CREDENTIALS_FILE = ~/.gem/credentials
6
+
7
+ clean:
8
+ rm -f *.gem
9
+ git checkout "$(VERSION_FILE)"
10
+
3
11
  tests:
4
- ruby -Ilib -e 'ARGV.each { |f| require f }' ./test/smartystreets_ruby_sdk/test*.rb ./test/smartystreets_ruby_sdk/us_street/test*.rb ./test/smartystreets_ruby_sdk/us_zipcode/test*.rb
5
-
6
- publish-patch:
7
- @python tag.py patch
8
- gem build smartystreets_ruby_sdk.gemspec
9
- gem push smartystreets_ruby_sdk-`git describe`.gem
10
-
11
- publish-minor:
12
- @python tag.py minor
13
- gem build smartystreets_ruby_sdk.gemspec
14
- gem push smartystreets_ruby_sdk-`git describe`.gem
15
-
16
- publish-major:
17
- @python tag.py major
18
- gem build smartystreets_ruby_sdk.gemspec
19
- gem push smartystreets_ruby_sdk-`git describe`.gem
12
+ rake test
13
+
14
+ package: clean
15
+ sed -i "s/0\.0\.0/$(shell git describe)/g" "$(VERSION_FILE)"
16
+ gem build *.gemspec
17
+ git checkout "$(VERSION_FILE)"
18
+
19
+ publish: credentials
20
+ gem push *.gem
21
+
22
+ credentials:
23
+ mkdir -p "$(dir $(CREDENTIALS_FILE))"
24
+ test -f $(CREDENTIALS_FILE) || echo ":rubygems_api_key: $(RUBYGEMS_API_KEY)" > $(CREDENTIALS_FILE)
25
+ chmod 0600 $(CREDENTIALS_FILE)
26
+
27
+ dependencies:
28
+ gem install minitest
29
+
30
+ version:
31
+ $(eval PREFIX := $(SOURCE_VERSION).)
32
+ $(eval CURRENT := $(shell git describe 2>/dev/null))
33
+ $(eval EXPECTED := $(PREFIX)$(shell git tag -l "$(PREFIX)*" | wc -l | xargs expr -1 +))
34
+ $(eval INCREMENTED := $(PREFIX)$(shell git tag -l "$(PREFIX)*" | wc -l | xargs expr 0 +))
35
+ @if [ "$(CURRENT)" != "$(EXPECTED)" ]; then git tag -a "$(INCREMENTED)" -m "" 2>/dev/null || true; fi
36
+
37
+ ####################################################################3
38
+
39
+ container-test:
40
+ docker-compose run sdk make tests
41
+ container-package: version
42
+ docker-compose run sdk make package
43
+ container-publish:
44
+ docker-compose run sdk make publish
45
+ git push origin --tags
data/Rakefile CHANGED
@@ -1,10 +1,5 @@
1
- require 'bundler/gem_tasks'
2
1
  require 'rake/testtask'
3
2
 
4
- desc 'Run tests'
5
- task default: :test
6
-
7
3
  Rake::TestTask.new do |t|
8
- t.libs << 'lib'
9
- t.pattern = 'test/**/test_*.rb'
4
+ t.pattern = 'test/**/test_*.rb'
10
5
  end
@@ -0,0 +1,10 @@
1
+ version: '3.7'
2
+ services:
3
+ sdk:
4
+ build: .
5
+ volumes:
6
+ - .:/code
7
+ environment:
8
+ - SMARTY_AUTH_ID
9
+ - SMARTY_AUTH_TOKEN
10
+ - RUBYGEMS_API_KEY
@@ -1,3 +1,3 @@
1
1
  module SmartyStreets
2
- VERSION = '5.4.0' # DO NOT EDIT (this is updated by a build job when a new release is published)
2
+ VERSION = '5.5.0' # DO NOT EDIT (this is updated by a build job when a new release is published)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartystreets_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SmartyStreets SDK Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-26 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,14 +80,15 @@ extensions: []
80
80
  extra_rdoc_files: []
81
81
  files:
82
82
  - ".gitignore"
83
+ - Dockerfile
83
84
  - Gemfile
84
85
  - LICENSE.txt
85
86
  - Makefile
86
87
  - README.md
87
88
  - Rakefile
88
- - Vagrantfile
89
89
  - bin/console
90
90
  - bin/setup
91
+ - docker-compose.yml
91
92
  - examples/international_example.rb
92
93
  - examples/us_autocomplete_example.rb
93
94
  - examples/us_extract_example.rb
@@ -152,7 +153,6 @@ files:
152
153
  - lib/smartystreets_ruby_sdk/version.rb
153
154
  - ruby-sdk-demo.json
154
155
  - smartystreets_ruby_sdk.gemspec
155
- - tag.py
156
156
  homepage: https://github.com/smartystreets/smartystreets-ruby-sdk
157
157
  licenses:
158
158
  - Apache-2.0
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.7.6
176
+ rubygems_version: 2.7.7
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: An official library for the SmartyStreets APIs
data/Vagrantfile DELETED
@@ -1,19 +0,0 @@
1
- VAGRANTFILE_API_VERSION = "2"
2
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
3
- config.ssh.forward_agent = true
4
- config.vm.box = "bento/ubuntu-18.04"
5
- config.vm.synced_folder "~/.identity", "/home/vagrant/.identity", create: true
6
- config.vm.synced_folder "~/.gnupg", "/home/vagrant/.gnupg", create: true
7
- config.vm.provision "shell", path: "https://s3-us-west-1.amazonaws.com/raptr-us-west-1/baseline/roles/vagrant"
8
-
9
- # box-specific
10
- config.vm.provision "shell", inline: "apt-get update"
11
- config.vm.provision "shell", inline: "apt-get install -y ruby" # Installs ruby 1.9 but we should install ruby 2.4...
12
- config.vm.provision "shell", inline: "apt-get install -y ruby git"
13
- config.vm.provision "shell", inline: "gem install minitest"
14
- config.vm.synced_folder "~/.gem", "/home/vagrant/.gem", create: true
15
-
16
- config.vm.provider "virtualbox" do |vb|
17
- vb.customize ["modifyvm", :id, "--nictype1", "Am79C973"]
18
- end
19
- end
data/tag.py DELETED
@@ -1,53 +0,0 @@
1
- import subprocess
2
- import sys
3
-
4
- INCREMENTS = {
5
- "patch": 2,
6
- "minor": 1,
7
- "major": 0,
8
- }
9
-
10
- def main():
11
- increment = sys.argv[-1]
12
- if increment not in ['patch', 'minor', 'major']:
13
- print 'Invalid INCREMENT value. Please use "patch", "minor", or "major".'
14
- os.Exit(1)
15
-
16
- increment = INCREMENTS[increment]
17
-
18
- current = subprocess.check_output("git describe", shell=True).split()
19
- last_stable = subprocess.check_output("git tag -l", shell=True).strip().split('\n')[-1]
20
- if current == last_stable:
21
- return
22
-
23
- last_stable_split = last_stable.split('.')
24
- last_stable_split[increment] = str(int(last_stable_split[increment]) + 1)
25
-
26
- if increment == 0:
27
- last_stable_split[1] = "0"
28
- last_stable_split[2] = "0"
29
-
30
- if increment == 1:
31
- last_stable_split[2] = "0"
32
-
33
- incremented = '.'.join(last_stable_split)
34
- print incremented
35
-
36
- replace_in_file('lib/smartystreets_ruby_sdk/version.rb', last_stable, incremented)
37
-
38
- subprocess.check_call('git add lib/smartystreets_ruby_sdk/version.rb', shell=True)
39
- subprocess.check_call('git commit -m "Incremented version number to {0}"'.format(incremented), shell=True)
40
- subprocess.check_call('git tag -a {0} -m "{0}"'.format(incremented), shell=True)
41
- subprocess.check_call('git push origin master --tags', shell=True)
42
-
43
-
44
- def replace_in_file(filename, search, replace):
45
- with open(filename) as source:
46
- updated = source.read().replace(search, replace)
47
-
48
- with open(filename, 'w') as update:
49
- update.write(updated)
50
-
51
-
52
- if __name__ == '__main__':
53
- main()