share_meow_client 0.1.0 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cca4a73ae4cd876ae4a0debc8b764936e758dcbc
4
- data.tar.gz: 98c1bd0fdce9bbb02acdf3953afa1edab4d7ca62
3
+ metadata.gz: 0ee9cb013ebb1b59c5cfcf68cc809f739657c83d
4
+ data.tar.gz: 2bacaa1fd6156ddee765c6856a3f3937bee84fe4
5
5
  SHA512:
6
- metadata.gz: 5b7cc1143a940e9070518ae10b137d3bc10a13d48f9059dd03c8b0b39de75ebb0cda2bdf0483bf5d5f205f5b384731b9632b079a6838919b69ea5e692e54939d
7
- data.tar.gz: e4c78494248af7cfa943d88d178062611c156b464e7f818ad4cdce9c12901e0dd077de0f71b540590c6bc87e829257639ae95819569dd17987d6ec5fc1f89e06
6
+ metadata.gz: ae9fecc819c44c7febd163adf2a250619484f4966e0d87bbcea7f19232cbd580aa433130ea5809c2dec9f1cdf879a555c5948202ea944180a9ef30bfd060df43
7
+ data.tar.gz: fb4e404df6babfc91e9332226a576d1c9db52bf2136ae870e8d9d19652d26e529ea15af2c92347da64e78ba2a028b17ae304b60f8233d1892866a751d8e5dbff
@@ -0,0 +1,7 @@
1
+ Documentation:
2
+ Enabled: false
3
+ Metrics/LineLength:
4
+ Max: 140
5
+ AllCops:
6
+ Exclude:
7
+ - 'bin/*'
@@ -1,4 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2.4
4
+ - 2.1.8
4
5
  before_install: gem install bundler -v 1.10.6
6
+ script:
7
+ - bundle exec rspec
8
+ - bundle exec rubocop --config .rubocop.yml
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
- # ShareMeowClient
1
+ # ShareMeowClient :heart_eyes_cat:
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/share_meow_client`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Ruby client for easily generating ShareMeow URL's. :star:
4
+
5
+ Learn more about [ShareMeow](https://github.com/producthunt/ShareMeow).
4
6
 
5
- TODO: Delete this and the text above, and describe your gem
6
7
 
7
8
  ## Installation
8
9
 
@@ -22,20 +23,36 @@ Or install it yourself as:
22
23
 
23
24
  ## Usage
24
25
 
25
- TODO: Write usage instructions here
26
+ First, you'll need to set the configuration variables in an initializer.
27
+
28
+ ```Ruby
29
+ # config/initializers/share_meow.rb
30
+ ShareMeowClient.configuration do |config|
31
+ config.base_url = 'https://your-share-meow.example.com'
32
+ config.secret_key = 'a_very_long_secret_key'
33
+ end
34
+ ```
35
+
36
+ Then, to generate a URL.
37
+
38
+ ```Ruby
39
+ image_url = ShareMeowClient.image_url(template: 'HelloWorld', options: { message: 'Hi' })
40
+ # => "https://your-share-meow.herokuapp.com/v1/eyJ0ZW1wbGF0ZSI6IkhlbGxvV29ybGQiLCJtZXNzYWdlIjoiSGVsbG8ifQ==/-lgitNQmEs9NaiWyOCHeV137D80=/image.jpg"
41
+ ```
42
+
43
+ `Template` is the name of your ShareMeow template. And then `options` are the required options for your template.
26
44
 
27
45
  ## Development
28
46
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
47
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
48
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
+ To install this gem onto your local machine, run `bundle exec rake install`.
32
50
 
33
51
  ## Contributing
34
52
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/share_meow_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/producthunt/ShareMeowCLient. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
36
54
 
37
55
 
38
56
  ## License
39
57
 
40
58
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "share_meow_client"
3
+ require 'bundler/setup'
4
+ require 'share_meow_client'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "share_meow_client"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start
@@ -4,7 +4,6 @@ require 'openssl'
4
4
  require 'share_meow_client/version'
5
5
  require 'helpers/configuration'
6
6
 
7
-
8
7
  module ShareMeowClient
9
8
  extend Configuration
10
9
 
@@ -42,6 +41,6 @@ module ShareMeowClient
42
41
  hmac = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'.freeze), secret_key, encoded_params)
43
42
  hmac_digest = Base64.urlsafe_encode64([hmac].pack('H*'.freeze))
44
43
 
45
- "#{ base_url }/v1/#{ encoded_params }/#{ hmac_digest }/image.jpg"
44
+ "#{base_url}/v1/#{encoded_params}/#{hmac_digest}/image.jpg"
46
45
  end
47
46
  end
@@ -1,3 +1,3 @@
1
1
  module ShareMeowClient
2
- VERSION = "0.1.0"
2
+ VERSION = '0.1.1'
3
3
  end
@@ -4,22 +4,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'share_meow_client/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "share_meow_client"
7
+ spec.name = 'share_meow_client'
8
8
  spec.version = ShareMeowClient::VERSION
9
- spec.authors = ["Mike Coutermarsh"]
10
- spec.email = ["coutermarsh.mike@gmail.com"]
9
+ spec.authors = ['Mike Coutermarsh']
10
+ spec.email = ['coutermarsh.mike@gmail.com']
11
11
 
12
- spec.summary = %q{Ruby client for generating ShareMeow URLs.}
13
- spec.description = %q{Ruby client for generating ShareMeow URLs (https://github.com/producthunt/ShareMeow) }
14
- spec.homepage = "https://github.com/producthunt/ShareMeowClient"
15
- spec.license = "MIT"
12
+ spec.summary = 'Ruby client for generating ShareMeow URLs.'
13
+ spec.description = 'Ruby client for generating ShareMeow URLs (https://github.com/producthunt/ShareMeow) '
14
+ spec.homepage = 'https://github.com/producthunt/ShareMeowClient'
15
+ spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.bindir = "exe"
18
+ spec.bindir = 'exe'
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
- spec.require_paths = ["lib"]
20
+ spec.require_paths = ['lib']
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.10"
23
- spec.add_development_dependency "rake", "~> 10.0"
24
- spec.add_development_dependency "rspec"
22
+ spec.add_development_dependency 'bundler', '~> 1.10'
23
+ spec.add_development_dependency 'rake', '~> 10.0'
24
+ spec.add_development_dependency 'rspec', '~> 3.4'
25
+ spec.add_development_dependency 'rubocop', '~> 0.35'
25
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: share_meow_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Coutermarsh
@@ -42,16 +42,30 @@ dependencies:
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '3.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.4'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.35'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '0'
68
+ version: '0.35'
55
69
  description: 'Ruby client for generating ShareMeow URLs (https://github.com/producthunt/ShareMeow) '
56
70
  email:
57
71
  - coutermarsh.mike@gmail.com
@@ -61,6 +75,7 @@ extra_rdoc_files: []
61
75
  files:
62
76
  - ".gitignore"
63
77
  - ".rspec"
78
+ - ".rubocop.yml"
64
79
  - ".travis.yml"
65
80
  - CODE_OF_CONDUCT.md
66
81
  - Gemfile