pytty 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f056f1916a3e2d18ae831ff16b1f5263cbed79df4363b7eeab8115f1fa656940
4
+ data.tar.gz: 4c0898d8a1857f247bd841194ec63a18f9ce7dd95e92f7e20e97aa44df9ff11c
5
+ SHA512:
6
+ metadata.gz: 14a532b686dd65d93987fe521e458532f120477e756028613addfe0a74be48469e1e66e2121cdcfa55740862a37619e6e4db91f8b5ed78fce894ba98238fb185
7
+ data.tar.gz: 768b880bda99b602e3b3717025e443226f97149216afd4ba2e4f79a0928b44ea52cc59f1559eb8ec3975900251cfefbc78d2a17d942de2f47b6b831082a7e522
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ pytty
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.0
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.0
7
+ before_install: gem install bundler -v 1.16.6
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in pytty.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,82 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pytty (0.0.2)
5
+ clamp (~> 1.3)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ clamp (1.3.0)
11
+ coderay (1.1.2)
12
+ diff-lcs (1.3)
13
+ ffi (1.10.0)
14
+ formatador (0.2.5)
15
+ guard (2.15.0)
16
+ formatador (>= 0.2.4)
17
+ listen (>= 2.7, < 4.0)
18
+ lumberjack (>= 1.0.12, < 2.0)
19
+ nenv (~> 0.1)
20
+ notiffany (~> 0.0)
21
+ pry (>= 0.9.12)
22
+ shellany (~> 0.0)
23
+ thor (>= 0.18.1)
24
+ guard-bundler (2.1.0)
25
+ bundler (~> 1.0)
26
+ guard (~> 2.2)
27
+ guard-compat (~> 1.1)
28
+ guard-compat (1.2.1)
29
+ guard-rspec (4.7.3)
30
+ guard (~> 2.1)
31
+ guard-compat (~> 1.1)
32
+ rspec (>= 2.99.0, < 4.0)
33
+ kommando (0.1.2)
34
+ listen (3.1.5)
35
+ rb-fsevent (~> 0.9, >= 0.9.4)
36
+ rb-inotify (~> 0.9, >= 0.9.7)
37
+ ruby_dep (~> 1.2)
38
+ lumberjack (1.0.13)
39
+ method_source (0.9.2)
40
+ nenv (0.3.0)
41
+ notiffany (0.1.1)
42
+ nenv (~> 0.1)
43
+ shellany (~> 0.0)
44
+ pry (0.12.2)
45
+ coderay (~> 1.1.0)
46
+ method_source (~> 0.9.0)
47
+ rake (10.5.0)
48
+ rb-fsevent (0.10.3)
49
+ rb-inotify (0.10.0)
50
+ ffi (~> 1.0)
51
+ rspec (3.8.0)
52
+ rspec-core (~> 3.8.0)
53
+ rspec-expectations (~> 3.8.0)
54
+ rspec-mocks (~> 3.8.0)
55
+ rspec-core (3.8.0)
56
+ rspec-support (~> 3.8.0)
57
+ rspec-expectations (3.8.2)
58
+ diff-lcs (>= 1.2.0, < 2.0)
59
+ rspec-support (~> 3.8.0)
60
+ rspec-mocks (3.8.0)
61
+ diff-lcs (>= 1.2.0, < 2.0)
62
+ rspec-support (~> 3.8.0)
63
+ rspec-support (3.8.0)
64
+ ruby_dep (1.5.0)
65
+ shellany (0.0.1)
66
+ thor (0.20.3)
67
+
68
+ PLATFORMS
69
+ ruby
70
+
71
+ DEPENDENCIES
72
+ bundler (~> 1.16)
73
+ guard
74
+ guard-bundler
75
+ guard-rspec
76
+ kommando
77
+ pytty!
78
+ rake (~> 10.0)
79
+ rspec (~> 3.0)
80
+
81
+ BUNDLED WITH
82
+ 1.17.2
data/Guardfile ADDED
@@ -0,0 +1,25 @@
1
+ guard :rspec, cmd: "bundle exec rspec" do
2
+ require "guard/rspec/dsl"
3
+ dsl = Guard::RSpec::Dsl.new(self)
4
+
5
+ watch %r{^lib\/pytty\/(?<component>client|daemon)\/cli\/(?<command>.+_command)\.rb$} do |m|
6
+ "spec/cli/#{m[:component]}/#{m[:command]}_spec.rb"
7
+ end
8
+
9
+ watch %r{^spec\/cli\/(?<component>client|daemon)\/(?<command>.+_command_spec)\.rb$} do |m|
10
+ m.instance_variable_get(:@original_value)
11
+ end
12
+
13
+ end
14
+
15
+ guard :bundler do
16
+ require 'guard/bundler'
17
+ require 'guard/bundler/verify'
18
+ helper = Guard::Bundler::Verify.new
19
+
20
+ files = ['Gemfile']
21
+ files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
22
+
23
+ # Assume files are symlinked from somewhere
24
+ files.each { |file| watch(helper.real_path(file)) }
25
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Matti Paksula
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1 @@
1
+ # pytty
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pytty"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/pytty ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # add lib to libpath (only needed when running from the sources)
5
+ require 'pathname'
6
+ lib_path = File.expand_path('../../lib', Pathname.new(__FILE__).realpath)
7
+ $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
8
+
9
+ STDOUT.sync = true
10
+
11
+ require 'pytty'
12
+ require 'pytty/client/cli'
13
+
14
+ Pytty::Client::Cli::RootCommand.run
data/exe/pyttyd ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # add lib to libpath (only needed when running from the sources)
5
+ require 'pathname'
6
+ lib_path = File.expand_path('../../lib', Pathname.new(__FILE__).realpath)
7
+ $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
8
+
9
+ STDOUT.sync = true
10
+
11
+ require 'pytty'
12
+ require 'pytty/daemon/cli'
13
+
14
+ Pytty::Daemon::Cli::RootCommand.run
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pytty
4
+ module Client
5
+ module Cli
6
+ class RootCommand < Clamp::Command
7
+ banner "🧻 pytty #{Pytty::VERSION}"
8
+
9
+ option ['-v', '--version'], :flag, "Show version information" do
10
+ puts Pytty::VERSION
11
+ exit 0
12
+ end
13
+
14
+ subcommand ["version"], "Show version information", Pytty::Common::Cli::VersionCommand
15
+
16
+ def self.run
17
+ super
18
+ rescue StandardError => exc
19
+ warn exc.message
20
+ warn exc.backtrace.join("\n")
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+
@@ -0,0 +1,4 @@
1
+ require "clamp"
2
+
3
+ require_relative "../common/cli/version_command"
4
+ require_relative "cli/root_command"
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pytty
4
+ module Common
5
+ module Cli
6
+ class VersionCommand < Clamp::Command
7
+ def execute
8
+ puts Pytty::VERSION
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pytty
4
+ module Daemon
5
+ module Cli
6
+ class RootCommand < Clamp::Command
7
+ banner "🚽 pyttyd #{Pytty::VERSION}"
8
+
9
+ option ['-v', '--version'], :flag, "Show version information" do
10
+ puts Pytty::VERSION
11
+ exit 0
12
+ end
13
+
14
+ subcommand ["version"], "Show version information", Pytty::Common::Cli::VersionCommand
15
+
16
+ def self.run
17
+ super
18
+ rescue StandardError => exc
19
+ warn exc.message
20
+ warn exc.backtrace.join("\n")
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+
@@ -0,0 +1,4 @@
1
+ require "clamp"
2
+
3
+ require_relative "../common/cli/version_command"
4
+ require_relative "cli/root_command"
@@ -0,0 +1,3 @@
1
+ module Pytty
2
+ VERSION = "0.0.2"
3
+ end
data/lib/pytty.rb ADDED
@@ -0,0 +1,5 @@
1
+ module Pytty
2
+ end
3
+
4
+ require_relative "pytty/version"
5
+
data/pytty.gemspec ADDED
@@ -0,0 +1,36 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "pytty/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pytty"
8
+ spec.version = Pytty::VERSION
9
+ spec.authors = ["Matti Paksula"]
10
+ spec.email = ["matti.paksula@iki.fi"]
11
+
12
+ spec.summary = "pytty"
13
+ spec.homepage = "https://github.com/pyttyhq/pytty-ruby"
14
+ spec.license = "MIT"
15
+
16
+ # Specify which files should be added to the gem when it is released.
17
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_runtime_dependency "clamp", "~> 1.3"
26
+
27
+ spec.add_development_dependency "bundler", "~> 1.16"
28
+ spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rspec", "~> 3.0"
30
+ spec.add_development_dependency "guard"
31
+ spec.add_development_dependency "guard-rspec"
32
+ spec.add_development_dependency "guard-bundler"
33
+
34
+ spec.add_development_dependency "kommando"
35
+
36
+ end
metadata ADDED
@@ -0,0 +1,180 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pytty
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Matti Paksula
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-01-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: clamp
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.16'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.16'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: guard-rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: guard-bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: kommando
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description:
126
+ email:
127
+ - matti.paksula@iki.fi
128
+ executables:
129
+ - pytty
130
+ - pyttyd
131
+ extensions: []
132
+ extra_rdoc_files: []
133
+ files:
134
+ - ".gitignore"
135
+ - ".rspec"
136
+ - ".ruby-gemset"
137
+ - ".ruby-version"
138
+ - ".travis.yml"
139
+ - Gemfile
140
+ - Gemfile.lock
141
+ - Guardfile
142
+ - LICENSE.txt
143
+ - README.md
144
+ - Rakefile
145
+ - bin/console
146
+ - bin/setup
147
+ - exe/pytty
148
+ - exe/pyttyd
149
+ - lib/pytty.rb
150
+ - lib/pytty/client/cli.rb
151
+ - lib/pytty/client/cli/root_command.rb
152
+ - lib/pytty/common/cli/version_command.rb
153
+ - lib/pytty/daemon/cli.rb
154
+ - lib/pytty/daemon/cli/root_command.rb
155
+ - lib/pytty/version.rb
156
+ - pytty.gemspec
157
+ homepage: https://github.com/pyttyhq/pytty-ruby
158
+ licenses:
159
+ - MIT
160
+ metadata: {}
161
+ post_install_message:
162
+ rdoc_options: []
163
+ require_paths:
164
+ - lib
165
+ required_ruby_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ requirements: []
176
+ rubygems_version: 3.0.1
177
+ signing_key:
178
+ specification_version: 4
179
+ summary: pytty
180
+ test_files: []