thefox-pastebin 1.2.1 → 1.2.2

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: c271a1134b30476ae86606ea62308b72bccd1271
4
- data.tar.gz: 5b4f01481b0d0810b0164381ccab1cb76fa5a25d
3
+ metadata.gz: 62cc2f92cba22a22952a81473401871359bff96e
4
+ data.tar.gz: 5f359ea19a0f13c0fece2033877cdff8470dce04
5
5
  SHA512:
6
- metadata.gz: 6249e9974e372ecfe94c5803f54e5644b744bc9a1fa4cda5b0b440248739f9aa87d9cee7e9e6497575938dc132ded70cfdd2de9bba17499e3dd4b88ea0af07c2
7
- data.tar.gz: d2c4991de8c281608fa21323c6765fb262c583f2ca6b47db70b820d4d6135e4006af5ae7cf54321165c85dbeea6fb96a3909b55db7edffcf71e4f322b3668c25
6
+ metadata.gz: 5ae0ef1f9b1236abbe4645199204e6d345e9c696a0f78c787e802056c4982c4c7b81a1bfaabf6d1aba6c9abe83f438b944b7c10e060980d48715ad7147cb9f3a
7
+ data.tar.gz: 4816d8ba079b98a0c08f04dfcb121cd65f4b97d1a436baeb0f23bfe0a0ed06d507960ff1729c93265afa879534e30bbe8a4fee2fb042c3200696cf6ab31ac684
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ /.bundle/
1
2
  .setup
2
3
  CHANGELOG-*.txt
4
+ Gemfile.lock
3
5
  /releases/
@@ -0,0 +1,21 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2
7
+ sudo: required
8
+ before_install:
9
+ - gem update --system
10
+ - gem install bundler -v '~>1.11'
11
+ - bundler --version
12
+ install:
13
+ - make
14
+ - gem build thefox-pastebin.gemspec
15
+ - gem install thefox-pastebin-*.gem
16
+ - gem list -l thefox-pastebin
17
+ script:
18
+ - make test
19
+ - cd
20
+ - which -a pastebin
21
+ - pastebin --version
data/Makefile CHANGED
@@ -2,3 +2,7 @@
2
2
  GEM_NAME = thefox-pastebin
3
3
 
4
4
  include Makefile.common
5
+
6
+ .PHONY: test
7
+ test:
8
+ RUBYOPT=-w $(BUNDLER) exec ./bin/pastebin --version
@@ -1,21 +1,22 @@
1
1
 
2
2
  # Ruby Common Big
3
- # 2015-12-07
3
+ # 2015-12-21
4
4
 
5
5
  MV = mv -nv
6
6
  RM = rm -rf
7
7
  MKDIR = mkdir -p
8
8
  BUNDLER = bundle
9
+ BUNDLER_OPTIONS = --jobs=5 --retry=3
9
10
  GEMSPEC_FILE = $(GEM_NAME).gemspec
10
11
 
11
- .PHONY: all
12
+ .PHONY: all $(ALL_TARGETS_EXT)
12
13
  all: setup
13
14
 
14
15
  .PHONY: setup
15
16
  setup: .setup
16
17
 
17
18
  .setup:
18
- $(BUNDLER) install
19
+ $(BUNDLER) install $(BUNDLER_OPTIONS)
19
20
  touch $@
20
21
 
21
22
  .PHONY: install
@@ -34,7 +35,9 @@ update:
34
35
 
35
36
  .PHONY: clean
36
37
  clean:
38
+ $(RM) .bundle
37
39
  $(RM) .setup
40
+ $(RM) Gemfile.lock
38
41
 
39
42
  .PHONY: release
40
43
  release: | releases
data/README.md CHANGED
@@ -92,6 +92,11 @@ You can also use your own Developer API Key. See [pastebin.com API documentation
92
92
  - `pastebin -r UJwPUmKp`
93
93
  - `cat /tmp/hello_world.txt | pastebin`
94
94
 
95
+ ## Project Links
96
+
97
+ - [Gem](https://rubygems.org/gems/thefox-pastebin)
98
+ - [Travis CI Repository](https://travis-ci.org/TheFox/pastebin)
99
+
95
100
  ## License
96
101
  Copyright (C) 2015 Christian Mayer <http://fox21.at>
97
102
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
  # coding: UTF-8
3
3
 
4
- require 'bundler/setup'
5
4
  require 'dotenv'
6
5
  require 'pastebin'
7
6
  require 'highline/import'
8
7
 
8
+
9
9
  rc_path = "#{ENV['HOME']}/.pastebinrc" # runtime configuration
10
10
  raw_id = nil
11
11
  is_login_mode = false
@@ -15,8 +15,8 @@ is_defaults_mode = false
15
15
 
16
16
  options = {}
17
17
 
18
- opts = OptionParser.new do |opts|
19
- opts.banner =<<EOB
18
+ opts = OptionParser.new do |o|
19
+ o.banner =<<EOB
20
20
  Pastebin is a CLI to https://pastebin.com
21
21
  Usage: pastebin [options]
22
22
 
@@ -25,63 +25,63 @@ Examples:
25
25
  cat foo.rb | pastebin -l ruby
26
26
  EOB
27
27
 
28
- opts.separator('')
29
- opts.separator('Options:')
28
+ o.separator('')
29
+ o.separator('Options:')
30
30
 
31
- opts.on('-c <file>', '--config <file>', String, "Used config file.", "Default: #{rc_path}") do |f|
31
+ o.on('-c <file>', '--config <file>', String, "Used config file.", "Default: #{rc_path}") do |f|
32
32
  rc_path = f
33
33
  end
34
34
 
35
- opts.on('-f <file>', '--file <file>', String, "Use a file for input, '-' for STDIN.") do |f|
35
+ o.on('-f <file>', '--file <file>', String, "Use a file for input, '-' for STDIN.") do |f|
36
36
  options["api_paste_code"] = f
37
37
  end
38
38
 
39
- opts.on('-n', '--name <name>', String, 'Assign a name to your paste.') do |n|
39
+ o.on('-n', '--name <name>', String, 'Assign a name to your paste.') do |n|
40
40
  options['api_paste_name'] = n
41
41
  end
42
42
 
43
43
  expire_a = ['n', '10m', '1h', '1d', '1m']
44
44
  expire_s = expire_a.join(', ')
45
- opts.on('-e', '--expire <time>', expire_a, 'These can be abbriviated, as long as they are unambigous.', "#{expire_s}", 'Default: n (never)' ) do |e|
45
+ o.on('-e', '--expire <time>', expire_a, 'These can be abbriviated, as long as they are unambigous.', "#{expire_s}", 'Default: n (never)' ) do |e|
46
46
  options['api_paste_expire_date'] = e.upcase
47
47
  end
48
48
 
49
- opts.on('-l', '--language <syntax>', String, "See https://pastebin.com/api - The 'api_paste_format' Paramater.") do |l|
49
+ o.on('-l', '--language <syntax>', String, "See https://pastebin.com/api - The 'api_paste_format' Paramater.") do |l|
50
50
  options['api_paste_format'] = l
51
51
  end
52
52
 
53
- opts.on('-u', '--unlisted', 'Make paste unlisted. (API_PASTE_PRIVATE=1)') do
53
+ o.on('-u', '--unlisted', 'Make paste unlisted. (API_PASTE_PRIVATE=1)') do
54
54
  options['api_paste_private'] = '1'
55
55
  end
56
56
 
57
- opts.on('-p', '--private', 'Make paste private. (API_PASTE_PRIVATE=2)') do
57
+ o.on('-p', '--private', 'Make paste private. (API_PASTE_PRIVATE=2)') do
58
58
  options['api_paste_private'] = '2'
59
59
  end
60
60
 
61
- opts.on('-r', '--raw <link>', String, 'Return raw text from a paste link.') do |r|
61
+ o.on('-r', '--raw <link>', String, 'Return raw text from a paste link.') do |r|
62
62
  is_raw_mode = true
63
63
  raw_id = r
64
64
  end
65
65
 
66
- opts.on_tail(nil, '--login', 'Login on pastebin.com with your user credentials.') do
66
+ o.on_tail(nil, '--login', 'Login on pastebin.com with your user credentials.') do
67
67
  is_login_mode = true
68
68
  end
69
69
 
70
- opts.on_tail(nil, '--skel', 'Print a basic example configuration.') do
70
+ o.on_tail(nil, '--skel', 'Print a basic example configuration.') do
71
71
  is_skel_mode = true
72
72
  end
73
73
 
74
- opts.on('-D', '--defaults', String, 'Print defaults.') do |r|
74
+ o.on('-D', '--defaults', String, 'Print defaults.') do |r|
75
75
  is_defaults_mode = true
76
76
  end
77
77
 
78
- opts.on_tail('--version', 'Show version.') do
78
+ o.on_tail('--version', 'Show version.') do
79
79
  puts "#{TheFox::Pastebin::NAME} #{TheFox::Pastebin::VERSION} (#{TheFox::Pastebin::DATE})"
80
80
  puts TheFox::Pastebin::HOMEPAGE
81
81
  exit
82
82
  end
83
83
 
84
- opts.on_tail('-h', '--help', 'Show this message.') do
84
+ o.on_tail('-h', '--help', 'Show this message.') do
85
85
  puts opts
86
86
  exit 3
87
87
  end
@@ -2,8 +2,8 @@
2
2
  module TheFox
3
3
  module Pastebin
4
4
  NAME = 'Pastebin'
5
- VERSION = '1.2.1'
6
- DATE = '2015-12-07'
5
+ VERSION = '1.2.2'
6
+ DATE = '2015-12-21'
7
7
  HOMEPAGE = 'https://github.com/TheFox/pastebin'
8
8
  end
9
9
  end
@@ -21,9 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.bindir = 'bin'
22
22
  spec.executables = ['pastebin']
23
23
  spec.require_paths = ['lib']
24
- spec.required_ruby_version = '>=2.2.0'
25
-
26
- spec.add_development_dependency 'bundler', '~>1.10'
24
+ spec.required_ruby_version = '>=1.9.0'
27
25
 
28
26
  spec.add_dependency 'dotenv', '~>2.0'
29
27
  spec.add_dependency 'highline', '~>1.7'
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thefox-pastebin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
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.10'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.10'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: dotenv
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -61,13 +47,12 @@ extensions: []
61
47
  extra_rdoc_files: []
62
48
  files:
63
49
  - ".gitignore"
50
+ - ".travis.yml"
64
51
  - Gemfile
65
- - Gemfile.lock
66
52
  - Makefile
67
53
  - Makefile.common
68
54
  - README.md
69
55
  - bin/pastebin
70
- - bin/test
71
56
  - lib/pastebin.rb
72
57
  - lib/pastebin/pastebin.rb
73
58
  - lib/pastebin/version.rb
@@ -85,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
70
  requirements:
86
71
  - - ">="
87
72
  - !ruby/object:Gem::Version
88
- version: 2.2.0
73
+ version: 1.9.0
89
74
  required_rubygems_version: !ruby/object:Gem::Requirement
90
75
  requirements:
91
76
  - - ">="
@@ -1,22 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- thefox-pastebin (1.2.1)
5
- dotenv (~> 2.0)
6
- highline (~> 1.7)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- dotenv (2.0.2)
12
- highline (1.7.8)
13
-
14
- PLATFORMS
15
- ruby
16
-
17
- DEPENDENCIES
18
- bundler (~> 1.10)
19
- thefox-pastebin!
20
-
21
- BUNDLED WITH
22
- 1.10.2
data/bin/test DELETED
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'cwd: ' + Dir.pwd
4
-
5
- #require 'bundler/setup'
6
-
7
-
8
-
9
-
10
-
11
- require 'rubygems'
12
- #require 'dotenv'
13
-
14
- gem 'pastebin'
15
-
16
- puts
17
- puts $:.join("\n")
18
- puts
19
-
20
-
21
-
22
-
23
-