cli-ui 0.1.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.
@@ -0,0 +1,21 @@
1
+ require 'cli/ui'
2
+ require 'io/console'
3
+
4
+ module CLI
5
+ module UI
6
+ module Terminal
7
+ # Returns the width of the terminal, if possible
8
+ # Otherwise will return 80
9
+ #
10
+ def self.width
11
+ if console = IO.respond_to?(:console) && IO.console
12
+ console.winsize[1]
13
+ else
14
+ 80
15
+ end
16
+ rescue Errno::EIO
17
+ 80
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ module CLI
2
+ module UI
3
+ VERSION = "0.1.2"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cli-ui
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Burke Libbey
8
+ - Julian Nadeau
9
+ - Lisa Ugray
10
+ autorequire:
11
+ bindir: exe
12
+ cert_chain: []
13
+ date: 2017-12-15 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bundler
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.15'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '1.15'
29
+ - !ruby/object:Gem::Dependency
30
+ name: rake
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: '10.0'
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '10.0'
43
+ - !ruby/object:Gem::Dependency
44
+ name: minitest
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '5.0'
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '5.0'
57
+ description: Terminal UI framework
58
+ email:
59
+ - burke.libbey@shopify.com
60
+ - julian.nadeau@shopify.com
61
+ - lisa.ugray@shopify.com
62
+ executables: []
63
+ extensions: []
64
+ extra_rdoc_files: []
65
+ files:
66
+ - ".gitignore"
67
+ - ".rubocop.yml"
68
+ - ".travis.yml"
69
+ - Gemfile
70
+ - Gemfile.lock
71
+ - LICENSE.txt
72
+ - README.md
73
+ - Rakefile
74
+ - bin/console
75
+ - cli-ui.gemspec
76
+ - dev.yml
77
+ - lib/cli/ui.rb
78
+ - lib/cli/ui/ansi.rb
79
+ - lib/cli/ui/box.rb
80
+ - lib/cli/ui/color.rb
81
+ - lib/cli/ui/formatter.rb
82
+ - lib/cli/ui/frame.rb
83
+ - lib/cli/ui/glyph.rb
84
+ - lib/cli/ui/progress.rb
85
+ - lib/cli/ui/prompt.rb
86
+ - lib/cli/ui/prompt/interactive_options.rb
87
+ - lib/cli/ui/spinner.rb
88
+ - lib/cli/ui/spinner/async.rb
89
+ - lib/cli/ui/spinner/spin_group.rb
90
+ - lib/cli/ui/stdout_router.rb
91
+ - lib/cli/ui/terminal.rb
92
+ - lib/cli/ui/version.rb
93
+ homepage: https://github.com/shopify/cli-ui
94
+ licenses:
95
+ - MIT
96
+ metadata: {}
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.6.14
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: Terminal UI framework
117
+ test_files: []