wangiry 0.0.4 → 0.0.5

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/wangiry +6 -6
  3. data/lib/wangiry/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18225857d9e60d77bd679bcccd515c2ad2ae0d04
4
- data.tar.gz: 7f6d014b01263a83bde315189d0e2c0ae9a213c5
3
+ metadata.gz: 6be2a6c6b652bd2962b5e7a56842a1af6c0cc598
4
+ data.tar.gz: a5e51ffb8782d23942710970ad304fdc5556c1c6
5
5
  SHA512:
6
- metadata.gz: 3a9ac029d95ccf1b7ce4f9af5c106d6450d09a6468cc175ba4d8aa61605ec84fb40bdec9850445b2b14c362695b9e40ad5f5aeba6a225704a81f8d3fb760e49d
7
- data.tar.gz: 908a4b5608a7894e9e73c298b6606b930f0898db70d251920202ad329888567b2057ba8ed55fd56271d016d630874dbfe70528b84c4847991e9675fe7a85e064
6
+ metadata.gz: cff550f418525f606c98d51c1462e9acd323b4cf197b3e4a594663faa9b24a91599dc5d25821923b0dd3c1bf1f1704261916bf71b7d0aa9daea90ca63d5c34dd
7
+ data.tar.gz: 6fc5b9d66aa620fc3e5899e7c87f1dd3ab65e20198edf66caf882f9ef702cafa226ce57c36ad12a589192dd24bc220c0ca6d133e3650f7b7f3d380bd2186e78e
@@ -2,12 +2,6 @@
2
2
  require 'wangiry'
3
3
  require 'json'
4
4
 
5
- if ARGV.first == '--help'
6
- STDERR.puts "usage: #{__FILE__} SETTING_FILE"
7
- STDERR.puts "How to write SETTING_FILE: see https://github.com/bash0C7/wangiry#write-setting-file"
8
- exit 1
9
- end
10
-
11
5
  setting = JSON.parse(File.read(ARGV.shift)) unless ARGV.size.zero?
12
6
  setting ||= {}
13
7
  setting['ACCOUNT_SID'] ||= ENV['WANGIRY_ACCOUNT_SID']
@@ -17,4 +11,10 @@ setting['TO_NUMBER'] ||= ENV['WANGIRY_TO_NUMBER']
17
11
  setting['URL'] ||= ENV['WANGIRY_URL']
18
12
  setting['CALLING_TIME'] ||= ENV['WANGIRY_CALLING_TIME']
19
13
 
14
+ if ARGV.first == '--help' || setting['ACCOUNT_SID'].nil?
15
+ STDERR.puts "usage: #{File.basename __FILE__} SETTING_FILE"
16
+ STDERR.puts "How to write SETTING_FILE: see https://github.com/bash0C7/wangiry#write-setting-file"
17
+ exit 1
18
+ end
19
+
20
20
  Wangiry.call setting['ACCOUNT_SID'].to_s, setting['AUTH_TOKEN'].to_s, setting['FROM_NUMBER'].to_s, setting['TO_NUMBER'].to_s, setting['URL'].to_s, setting['CALLING_TIME'].to_i
@@ -1,3 +1,3 @@
1
1
  module Wangiry
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wangiry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bash0C7
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-25 00:00:00.000000000 Z
11
+ date: 2013-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: twilio-ruby