butts 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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -0
- data/.gitignore +35 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +19 -0
- data/Rakefile +3 -0
- data/bin/butts +22 -0
- data/butts.gemspec +26 -0
- data/lib/butts.rb +16 -0
- data/lib/butts/version.rb +3 -0
- metadata +119 -0
- metadata.gz.sig +3 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 05390c1207b5dd73aedc47c80c612edbf4502a66
|
4
|
+
data.tar.gz: 2219f061429ffbcea828b155e3cef2663305daca
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 60a01a7a03903fea74b22adc5061ffa784b55cd7006d35b285637e84c28add08668085441b30bae4f0a50abd0dff5b5494a6c60e779cb80aadecfa6ed63156c2
|
7
|
+
data.tar.gz: 6701091df82c8d795117451fec6e455c569ea2af96cf735daa97338b6d3dc14a123d8a7e2eaefe54f25ed02eb914a54d4d8742b2575289c54d18eb2aad804a1f
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/vendor/bundle
|
26
|
+
/lib/bundler/man/
|
27
|
+
|
28
|
+
# for a library or gem, you might want to ignore these files since the code is
|
29
|
+
# intended to run in multiple environments; otherwise, check them in:
|
30
|
+
Gemfile.lock
|
31
|
+
# .ruby-version
|
32
|
+
# .ruby-gemset
|
33
|
+
|
34
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
35
|
+
.rvmrc
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 William Mathewson
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Butts [](https://travis-ci.org/neanias/butts)
|
2
|
+
|
3
|
+
A gem to interact with butts.so for CLI fart noises
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install butts
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
$ butts https://github.com/neanias/butts
|
12
|
+
|
13
|
+
## Contributing
|
14
|
+
|
15
|
+
1. Fork it ( https://github.com/neanias/butts/fork )
|
16
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
17
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
18
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
19
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/butts
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require 'optparse'
|
5
|
+
|
6
|
+
require_relative '../lib/butts'
|
7
|
+
|
8
|
+
optparse = OptionParser.new do |opts|
|
9
|
+
opts.on('-h', '--help', 'Display this screen') do
|
10
|
+
puts "Usage: #{File.basename($PROGRAM_NAME)} URL1 URL2 ..."
|
11
|
+
end
|
12
|
+
|
13
|
+
opts.on('-v', '--version', 'Display the version of butts') do
|
14
|
+
puts Butts::VERSION
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
optparse.parse!
|
19
|
+
|
20
|
+
ARGV.each do |url|
|
21
|
+
puts Butts.get_short_url(url)
|
22
|
+
end
|
data/butts.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'butts/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'butts'
|
8
|
+
spec.version = Butts::VERSION
|
9
|
+
spec.authors = ['William Mathewson']
|
10
|
+
spec.email = ['wncmathewson@me.com']
|
11
|
+
spec.summary = 'A gem to interact with butts.so for CLI fart noises'
|
12
|
+
spec.homepage = 'https://github.com/neanias/butts'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.required_ruby_version = '>= 1.9'
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
24
|
+
|
25
|
+
spec.add_runtime_dependency 'httparty', '~> 0.13'
|
26
|
+
end
|
data/lib/butts.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
require_relative 'butts/version'
|
3
|
+
|
4
|
+
module Butts
|
5
|
+
@butts_uri = 'http://butts.so/api/v1'
|
6
|
+
@header = { 'Content-Type' => 'application/json' }
|
7
|
+
|
8
|
+
def self.get_short_url(url)
|
9
|
+
options = { body: {url: url}.to_json }
|
10
|
+
options[:headers] = @header
|
11
|
+
|
12
|
+
shortcode = HTTParty.post("#{@butts_uri}/create", options)
|
13
|
+
|
14
|
+
"http://butts.so/#{shortcode['shortcode']}"
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: butts
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- William Mathewson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDdDCCAlygAwIBAgIBATANBgkqhkiG9w0BA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0P09ncVBHD/oIGOacsOzJpX4fBDlbktp+z9niEhcyJgWXhi1BuXV75Dqrid2
|
29
|
+
e72OOdExmnXMh25lPCJH3GiWe4p70wgL7cMqd/X1NHzAfr2GI+CiMjLzCynIl5l3
|
30
|
+
vhmJLxJbhixm8YFiMw5IQ+eqYy2XbpIifAoqt0EOz5PMq2xRTFaZ463WgGKyW/9K
|
31
|
+
QJdPChDoNFnekdfEGjFvvjSqlZ5MGrqS
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: bundler
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.7'
|
42
|
+
type: :development
|
43
|
+
prerelease: false
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.7'
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rake
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '10.0'
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '10.0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: httparty
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0.13'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.13'
|
77
|
+
description:
|
78
|
+
email:
|
79
|
+
- wncmathewson@me.com
|
80
|
+
executables:
|
81
|
+
- butts
|
82
|
+
extensions: []
|
83
|
+
extra_rdoc_files: []
|
84
|
+
files:
|
85
|
+
- ".gitignore"
|
86
|
+
- ".travis.yml"
|
87
|
+
- Gemfile
|
88
|
+
- LICENSE.txt
|
89
|
+
- README.md
|
90
|
+
- Rakefile
|
91
|
+
- bin/butts
|
92
|
+
- butts.gemspec
|
93
|
+
- lib/butts.rb
|
94
|
+
- lib/butts/version.rb
|
95
|
+
homepage: https://github.com/neanias/butts
|
96
|
+
licenses:
|
97
|
+
- MIT
|
98
|
+
metadata: {}
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options: []
|
101
|
+
require_paths:
|
102
|
+
- lib
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '1.9'
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
requirements: []
|
114
|
+
rubyforge_project:
|
115
|
+
rubygems_version: 2.4.3
|
116
|
+
signing_key:
|
117
|
+
specification_version: 4
|
118
|
+
summary: A gem to interact with butts.so for CLI fart noises
|
119
|
+
test_files: []
|
metadata.gz.sig
ADDED