mireru 0.0.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 99d2d11f881eb11ebd1ad245293dfccf27686ae2
4
+ data.tar.gz: 5bc6780adf13074b891b4977fd80cbc3b174ccc1
5
+ SHA512:
6
+ metadata.gz: 5bb1cc7ecce29d04e7caad8d4979cbbd4d4fcd6895caf60eed6e1ef01a9ac5335b582fae03a1764378dcdd9fe8740238dd3f945f95923b124fe2309f5962c6f6
7
+ data.tar.gz: 0151c89f4dc77a50f5a26b537d80c7df609d7f7037e4e562520a4d01461aff8baf03815c6b4937170e67b190e8211351b49c05ac43a32eeeb7cc6ad3967957c2
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mireru.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Masafumi Yokoyama
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,29 @@
1
+ # Mireru - Lightweight File Viewer for CLI
2
+
3
+ Mireru is a lightweight file viewer. It can launch from CLI. Powered by Ruby/GTK3.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'mireru'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install mireru
18
+
19
+ ## Usage
20
+
21
+ $ mireru <file path>
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/mireru ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "mireru/command/mireru"
4
+
5
+ Mireru::Command::Mireru.run(*ARGV)
@@ -0,0 +1,55 @@
1
+ require 'gtk3'
2
+
3
+ module Mireru
4
+ module Command
5
+ class Mireru
6
+ USAGE = "Usage: mireru <file path>"
7
+
8
+ class << self
9
+ def run(*arguments)
10
+ new.run(arguments)
11
+ end
12
+ end
13
+
14
+ def initialize
15
+ end
16
+
17
+ def run(arguments)
18
+ file = arguments[0]
19
+
20
+ unless file
21
+ puts("Error: no argument.")
22
+ puts(USAGE)
23
+ exit(false)
24
+ end
25
+
26
+ unless File.file?(file)
27
+ puts("Error: missing file.")
28
+ puts(USAGE)
29
+ exit(false)
30
+ end
31
+
32
+ unless /\.(png|jpe?g|gif)$/i =~ file
33
+ puts("Error: this file type is not support as yet.")
34
+ puts(USAGE)
35
+ exit(false)
36
+ end
37
+
38
+ image = Gtk::Image.new
39
+ image.file = file
40
+
41
+ window = Gtk::Window.new
42
+
43
+ window.signal_connect("destroy") do
44
+ Gtk.main_quit
45
+ end
46
+
47
+ window.border_width = 10
48
+ window.add(image)
49
+ window.show_all
50
+
51
+ Gtk.main
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,3 @@
1
+ module Mireru
2
+ VERSION = "0.0.3"
3
+ end
data/lib/mireru.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "mireru/version"
2
+
3
+ module Mireru
4
+ # Your code goes here...
5
+ end
data/mireru.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mireru/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "mireru"
8
+ spec.version = Mireru::VERSION
9
+ spec.authors = ["Masafumi Yokoyama"]
10
+ spec.email = ["myokoym@gmail.com"]
11
+ spec.summary = %q{Lightweight file viewer for CLI}
12
+ spec.description = %q{Mireru is a lightweight file viewer. It can launch from CLI. Powered by Ruby/GTK3.}
13
+ spec.homepage = "https://github.com/myokoym/mireru"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_runtime_dependency("gtk3")
22
+
23
+ spec.add_development_dependency("bundler", "~> 1.3")
24
+ spec.add_development_dependency("rake")
25
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mireru
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Masafumi Yokoyama
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-04-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: gtk3
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
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.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Mireru is a lightweight file viewer. It can launch from CLI. Powered
56
+ by Ruby/GTK3.
57
+ email:
58
+ - myokoym@gmail.com
59
+ executables:
60
+ - mireru
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - .gitignore
65
+ - Gemfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - bin/mireru
70
+ - lib/mireru.rb
71
+ - lib/mireru/command/mireru.rb
72
+ - lib/mireru/version.rb
73
+ - mireru.gemspec
74
+ homepage: https://github.com/myokoym/mireru
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.0.0
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: Lightweight file viewer for CLI
98
+ test_files: []
99
+ has_rdoc: