twizo 0.1.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.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/Gemfile +6 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +126 -0
  6. data/Rakefile +2 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +8 -0
  9. data/examples/backup_codes.rb +31 -0
  10. data/examples/backup_codes_check.rb +29 -0
  11. data/examples/backup_codes_delete.rb +31 -0
  12. data/examples/backup_codes_update.rb +31 -0
  13. data/examples/backup_codes_verify.rb +34 -0
  14. data/examples/balance.rb +18 -0
  15. data/examples/examples_init.rb +43 -0
  16. data/examples/number_lookup.rb +32 -0
  17. data/examples/number_lookup_results.rb +28 -0
  18. data/examples/number_lookup_status.rb +29 -0
  19. data/examples/sms.rb +32 -0
  20. data/examples/sms_advanced.rb +33 -0
  21. data/examples/sms_concat.rb +32 -0
  22. data/examples/sms_multiple.rb +35 -0
  23. data/examples/sms_results.rb +28 -0
  24. data/examples/sms_status.rb +29 -0
  25. data/examples/sms_validation_errors.rb +28 -0
  26. data/examples/verification.rb +31 -0
  27. data/examples/verification_status.rb +29 -0
  28. data/examples/verification_verify_token.rb +39 -0
  29. data/examples/widget.rb +31 -0
  30. data/examples/widget_status.rb +34 -0
  31. data/lib/twizo.rb +190 -0
  32. data/lib/twizo/client.rb +45 -0
  33. data/lib/twizo/client/net_http_client.rb +48 -0
  34. data/lib/twizo/entity.rb +114 -0
  35. data/lib/twizo/modules/backup_codes.rb +100 -0
  36. data/lib/twizo/modules/balance.rb +40 -0
  37. data/lib/twizo/modules/number_lookup.rb +81 -0
  38. data/lib/twizo/modules/params/backup_codes_params.rb +19 -0
  39. data/lib/twizo/modules/params/number_lookup_params.rb +23 -0
  40. data/lib/twizo/modules/params/params.rb +37 -0
  41. data/lib/twizo/modules/params/sms_params.rb +34 -0
  42. data/lib/twizo/modules/params/verification_params.rb +30 -0
  43. data/lib/twizo/modules/params/widget_params.rb +29 -0
  44. data/lib/twizo/modules/sms.rb +130 -0
  45. data/lib/twizo/modules/verification.rb +73 -0
  46. data/lib/twizo/modules/widget.rb +59 -0
  47. data/lib/twizo/result.rb +66 -0
  48. data/lib/twizo/status_codes.rb +32 -0
  49. data/lib/twizo/twizo_error.rb +26 -0
  50. data/lib/twizo/version.rb +3 -0
  51. data/test/test_all.rb +19 -0
  52. data/test/test_backup_codes.rb +120 -0
  53. data/test/test_balance.rb +51 -0
  54. data/test/test_init.rb +41 -0
  55. data/test/test_number_lookup.rb +215 -0
  56. data/test/test_sms.rb +270 -0
  57. data/test/test_verification.rb +106 -0
  58. data/test/test_widget.rb +107 -0
  59. data/twizo.gemspec +34 -0
  60. metadata +154 -0
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "twizo/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "twizo"
8
+ spec.version = Twizo::VERSION
9
+ spec.date = "2017-10-04"
10
+ spec.authors = ["Arjen Heijkoop"]
11
+ spec.email = ["support@twizo.com"]
12
+
13
+ spec.summary = %q{Connect to the Twizo API using the Ruby library.}
14
+ spec.description = %q{Connect to the Twizo API using the Ruby library.}
15
+ spec.homepage = "https://github.com/twizoapi/lib-api-ruby"
16
+ spec.license = "MIT"
17
+
18
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
19
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
20
+ if spec.respond_to?(:metadata)
21
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
22
+ else
23
+ raise "RubyGems 2.0 or newer is required to protect against " \
24
+ "public gem pushes."
25
+ end
26
+
27
+ spec.files = `git ls-files -z`.split("\x0")
28
+ spec.test_files = spec.files.grep(%r{^test|spec|features})
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_development_dependency "bundler", "~> 1.15"
32
+ spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency "test-unit", "~> 3.2"
34
+ end
metadata ADDED
@@ -0,0 +1,154 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: twizo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Arjen Heijkoop
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-10-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.15'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.15'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: test-unit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
55
+ description: Connect to the Twizo API using the Ruby library.
56
+ email:
57
+ - support@twizo.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - bin/console
68
+ - bin/setup
69
+ - examples/backup_codes.rb
70
+ - examples/backup_codes_check.rb
71
+ - examples/backup_codes_delete.rb
72
+ - examples/backup_codes_update.rb
73
+ - examples/backup_codes_verify.rb
74
+ - examples/balance.rb
75
+ - examples/examples_init.rb
76
+ - examples/number_lookup.rb
77
+ - examples/number_lookup_results.rb
78
+ - examples/number_lookup_status.rb
79
+ - examples/sms.rb
80
+ - examples/sms_advanced.rb
81
+ - examples/sms_concat.rb
82
+ - examples/sms_multiple.rb
83
+ - examples/sms_results.rb
84
+ - examples/sms_status.rb
85
+ - examples/sms_validation_errors.rb
86
+ - examples/verification.rb
87
+ - examples/verification_status.rb
88
+ - examples/verification_verify_token.rb
89
+ - examples/widget.rb
90
+ - examples/widget_status.rb
91
+ - lib/twizo.rb
92
+ - lib/twizo/client.rb
93
+ - lib/twizo/client/net_http_client.rb
94
+ - lib/twizo/entity.rb
95
+ - lib/twizo/modules/backup_codes.rb
96
+ - lib/twizo/modules/balance.rb
97
+ - lib/twizo/modules/number_lookup.rb
98
+ - lib/twizo/modules/params/backup_codes_params.rb
99
+ - lib/twizo/modules/params/number_lookup_params.rb
100
+ - lib/twizo/modules/params/params.rb
101
+ - lib/twizo/modules/params/sms_params.rb
102
+ - lib/twizo/modules/params/verification_params.rb
103
+ - lib/twizo/modules/params/widget_params.rb
104
+ - lib/twizo/modules/sms.rb
105
+ - lib/twizo/modules/verification.rb
106
+ - lib/twizo/modules/widget.rb
107
+ - lib/twizo/result.rb
108
+ - lib/twizo/status_codes.rb
109
+ - lib/twizo/twizo_error.rb
110
+ - lib/twizo/version.rb
111
+ - test/test_all.rb
112
+ - test/test_backup_codes.rb
113
+ - test/test_balance.rb
114
+ - test/test_init.rb
115
+ - test/test_number_lookup.rb
116
+ - test/test_sms.rb
117
+ - test/test_verification.rb
118
+ - test/test_widget.rb
119
+ - twizo.gemspec
120
+ homepage: https://github.com/twizoapi/lib-api-ruby
121
+ licenses:
122
+ - MIT
123
+ metadata:
124
+ allowed_push_host: https://rubygems.org
125
+ post_install_message:
126
+ rdoc_options: []
127
+ require_paths:
128
+ - lib
129
+ required_ruby_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ requirements: []
140
+ rubyforge_project:
141
+ rubygems_version: 2.6.14
142
+ signing_key:
143
+ specification_version: 4
144
+ summary: Connect to the Twizo API using the Ruby library.
145
+ test_files:
146
+ - test/test_all.rb
147
+ - test/test_backup_codes.rb
148
+ - test/test_balance.rb
149
+ - test/test_init.rb
150
+ - test/test_number_lookup.rb
151
+ - test/test_sms.rb
152
+ - test/test_verification.rb
153
+ - test/test_widget.rb
154
+ - twizo.gemspec