mireru 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfe9e101ef8c66b8d9a69ef0c629a6d2b77706ef
4
- data.tar.gz: a4725b2c6cecd0989c01d8ed180e81be07832deb
3
+ metadata.gz: 0860d65adc347e640257a0736b35c5a05ab1c97c
4
+ data.tar.gz: f0ffa88f5a38f97327ad80a7c7f2509a2d3d664a
5
5
  SHA512:
6
- metadata.gz: abf1106c655c22887bedc93c1a03f91cd3e0d8fe4062e782040378c99e89bc37eee1baea9082575b2bf17a68d1fba4d0ba880c26940f6303362307d4a2d78b69
7
- data.tar.gz: 559d84ab5ebcecef3c7f27022247bbaec3948cb416850d3c2dc184550a97d68cf4165a5e6dbadac0c587734fef3f74daf87242e6af0208c47d2aee00425ef42b
6
+ metadata.gz: 5db1e077cfa432da0242d0b5da49e7f64a42a0ee4aa250fe1d105e4cc6430840908ee1666d629a06dac20f9fd9744766a675c94b48d30ffe0cae031114670682
7
+ data.tar.gz: 2b40d5cf8f7cf0eee1463e57f5c0b8a29250c83bed2cfa2f90079a41cc1129d6d991a2db5256b040016cf016ee966e3c44b888dbe81f5805b2505bad1133712b
data/NEWS.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # NEWS
2
2
 
3
+ ## 0.1.7: 2013-10-29
4
+
5
+ Binary (hexdump) support release!
6
+
7
+ ### Changes
8
+
9
+ * Improvements
10
+ * Supported binary file (hexdump).
11
+
3
12
  ## 0.1.6: 2013-09-29
4
13
 
5
14
  Video support release!
data/README.md CHANGED
@@ -8,6 +8,7 @@ A friend of a keyboard.
8
8
 
9
9
  * Ruby/GTK3, Ruby/GtkSourceView3, Ruby/ClutterGTK, Ruby/ClutterGStreamer in
10
10
  [Ruby-GNOME2](http://ruby-gnome2.sourceforge.jp/)
11
+ * [hexdump](https://github.com/postmodern/hexdump)
11
12
 
12
13
  ## Installation
13
14
 
@@ -0,0 +1,30 @@
1
+ require "stringio"
2
+ require "hexdump"
3
+
4
+ module Mireru
5
+ class Binary
6
+ class << self
7
+ def create(file)
8
+ dump = hexdump(file).string
9
+ create_text_view(dump)
10
+ end
11
+
12
+ private
13
+ def hexdump(file)
14
+ io = StringIO.new
15
+ bytes = File.open(file, "rb").read(20 * 1024)
16
+ Hexdump.dump(bytes, :output => io)
17
+ io
18
+ end
19
+
20
+ def create_text_view(text)
21
+ buffer = Gtk::TextBuffer.new
22
+ buffer.text = text
23
+ view = Gtk::TextView.new(buffer)
24
+ view.editable = false
25
+ view.override_font(Pango::FontDescription.new("Monospace"))
26
+ view
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module Mireru
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
data/lib/mireru/widget.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "gtk3"
2
2
  require "gtksourceview3"
3
3
  require "mireru/video"
4
+ require "mireru/binary"
4
5
 
5
6
  module Mireru
6
7
  class Error < StandardError
@@ -23,7 +24,7 @@ module Mireru
23
24
  begin
24
25
  buffer = buffer_from_file(file)
25
26
  rescue Mireru::Error
26
- return sorry
27
+ return Mireru::Binary.create(file)
27
28
  end
28
29
  view = GtkSource::View.new(buffer)
29
30
  view.show_line_numbers = true
@@ -53,6 +54,7 @@ module Mireru
53
54
  end
54
55
 
55
56
  def buffer_from_text(text)
57
+ # TODO: at times the error don't occurred by tar file
56
58
  raise Mireru::Error unless text.valid_encoding?
57
59
  text.encode!("utf-8") unless text.encoding == "utf-8"
58
60
  buffer = GtkSource::Buffer.new
@@ -60,6 +62,7 @@ module Mireru
60
62
  buffer
61
63
  end
62
64
 
65
+ # unused
63
66
  def sorry
64
67
  image = Gtk::Image.new
65
68
  base_dir = File.join(File.dirname(__FILE__), "..", "..")
@@ -0,0 +1,17 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+
10
+ # Ignore the build directory
11
+ /build
12
+
13
+ # Ignore Sass' cache
14
+ /.sass-cache
15
+
16
+ # Ignore .DS_store file
17
+ .DS_Store
data/middleman/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ # If you have OpenSSL installed, we recommend updating
2
+ # the following line to use "https"
3
+ source 'http://rubygems.org'
4
+
5
+ gem "redcarpet"
6
+ gem "middleman", "~>3.1.5"
7
+ gem "middleman-deploy"
8
+
9
+ # Live-reloading plugin
10
+ gem "middleman-livereload", "~> 3.1.0"
11
+
12
+ # For faster file watcher updates on Windows:
13
+ gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
14
+
15
+ # Cross-templating language block fix for Ruby 1.8
16
+ platforms :mri_18 do
17
+ gem "ruby18_source_location"
18
+ end
@@ -0,0 +1,86 @@
1
+ ###
2
+ # Compass
3
+ ###
4
+
5
+ # Change Compass configuration
6
+ # compass_config do |config|
7
+ # config.output_style = :compact
8
+ # end
9
+
10
+ ###
11
+ # Page options, layouts, aliases and proxies
12
+ ###
13
+
14
+ # Per-page layout changes:
15
+ #
16
+ # With no layout
17
+ # page "/path/to/file.html", :layout => false
18
+ #
19
+ # With alternative layout
20
+ # page "/path/to/file.html", :layout => :otherlayout
21
+ #
22
+ # A path which all have the same layout
23
+ # with_layout :admin do
24
+ # page "/admin/*"
25
+ # end
26
+
27
+ # Proxy pages (http://middlemanapp.com/dynamic-pages/)
28
+ # proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
29
+ # :which_fake_page => "Rendering a fake page with a local variable" }
30
+
31
+ ###
32
+ # Helpers
33
+ ###
34
+
35
+ # Automatic image dimensions on image_tag helper
36
+ # activate :automatic_image_sizes
37
+
38
+ # Reload the browser automatically whenever files change
39
+ # activate :livereload
40
+
41
+ # Methods defined in the helpers block are available in templates
42
+ # helpers do
43
+ # def some_helper
44
+ # "Helping"
45
+ # end
46
+ # end
47
+
48
+ set :css_dir, 'stylesheets'
49
+
50
+ set :js_dir, 'javascripts'
51
+
52
+ set :images_dir, 'images'
53
+
54
+ # Markdown settings
55
+ set :markdown_engine, :redcarpet
56
+ set :markdown, :tables => true,
57
+ :autolink => true,
58
+ :gh_blockcode => true,
59
+ :fenced_code_blocks => true,
60
+ :with_toc_data => true,
61
+ :smartypants => true
62
+
63
+ # Localization
64
+ activate :i18n
65
+
66
+ # Build-specific configuration
67
+ configure :build do
68
+ # For example, change the Compass output style for deployment
69
+ # activate :minify_css
70
+
71
+ # Minify Javascript on build
72
+ # activate :minify_javascript
73
+
74
+ # Enable cache buster
75
+ # activate :asset_hash
76
+
77
+ # Use relative URLs
78
+ activate :relative_assets
79
+
80
+ # Or use a different image path
81
+ # set :http_prefix, "/Content/images/"
82
+ end
83
+
84
+ activate :deploy do |deploy|
85
+ deploy.method = :git
86
+ end
@@ -0,0 +1,7 @@
1
+ ---
2
+ - uri: usage.html
3
+ name: Usage
4
+ - uri: https://github.com/myokoym/mireru
5
+ name: GitHub
6
+ - uri: https://rubygems.org/gems/mireru
7
+ name: RubyGems
@@ -0,0 +1,32 @@
1
+ ---
2
+ en:
3
+ Usage: "Usage"
4
+ Launch: "Launch"
5
+ if_no_argument: "If no argument, then search current directory."
6
+ Options: "Options"
7
+ recursive_search: "recursive search as “**/*”"
8
+ set_font: "set font such as “Monospace 16”"
9
+ Keybind: "Keybind"
10
+ Common: "Common"
11
+ next: "next"
12
+ prev: "prev"
13
+ reload: "reload"
14
+ expand_path: "expand path"
15
+ quit: "quit"
16
+ Scroll: "Scroll"
17
+ left: "left"
18
+ down: "down"
19
+ up: "up"
20
+ right: "right"
21
+ Scale: "Scale"
22
+ larger: "larger"
23
+ smaller: "smaller"
24
+ Special: "Special"
25
+ thumbnail: "thumbnail"
26
+ Image: "Image"
27
+ fits_window: "fits window size"
28
+ original_size: "original size"
29
+ Text: "Text"
30
+ change_font: "change font (at random)"
31
+ Video: "Video"
32
+ play_pause: "play/pause"
@@ -0,0 +1,32 @@
1
+ ---
2
+ ja:
3
+ Usage: "使い方"
4
+ Launch: "起動"
5
+ if_no_argument: "引数が指定されなかった場合、カレントディレクトリを検索します。"
6
+ Options: "オプション"
7
+ recursive_search: "“**/*”のように、再帰的に検索します。"
8
+ set_font: "例えば、“Monospace 16”のように指定します。"
9
+ Keybind: "キーバインド"
10
+ Common: "共通"
11
+ next: "次のファイルへ"
12
+ prev: "前のファイルへ"
13
+ reload: "再読み込み"
14
+ expand_path: "タイトルバーに絶対パスを表示"
15
+ quit: "終了"
16
+ Scroll: "スクロール"
17
+ left: "左"
18
+ down: "下"
19
+ up: "上"
20
+ right: "右"
21
+ Scale: "拡大・縮小"
22
+ larger: "拡大"
23
+ smaller: "縮小"
24
+ Special: "ファイル種類別のキーバインド"
25
+ thumbnail: "サムネイルを表示"
26
+ Image: "画像ファイル用"
27
+ fits_window: "ウィンドウサイズ"
28
+ original_size: "オリジナルサイズ"
29
+ Text: "テキストファイル用"
30
+ change_font: "フォントを変更(ランダム)"
31
+ Video: "ビデオファイル用"
32
+ play_pause: "再生/一時停止"
@@ -0,0 +1,17 @@
1
+ %html
2
+ %head
3
+ %meta(charset="utf-8")
4
+
5
+ -# Always force latest IE rendering engine or request Chrome Frame
6
+ %meta(content="IE=edge,chrome=1" http-equiv="X-UA-Compatible")
7
+
8
+ -# Use title if it's in the page YAML frontmatter
9
+ %title= current_page.data.title || "The Middleman"
10
+
11
+ = stylesheet_link_tag "vendor/normalize"
12
+ = stylesheet_link_tag "index"
13
+
14
+ %meta(name="viewport" content="width=device-width")
15
+
16
+ %body{class: page_classes}
17
+ = yield
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: mireru
3
+ ---
4
+
5
+ %h1 mireru
6
+
7
+ %ul
8
+ - data.links.each_with_index do |link, i|
9
+ - id = "link-#{i}"
10
+ %li
11
+ %a{href: link.uri, id: id}
12
+ %label(for="#{id}")= link.name
13
+
14
+ %footer
15
+ %p (c) 2013 Masafumi Yokoyama
@@ -0,0 +1,69 @@
1
+ <h2><%= t(:Usage) %></h2>
2
+
3
+ <h3><%= t(:Launch) %></h3>
4
+
5
+ <pre> $ mireru [OPTION]... [FILE]...</pre>
6
+ <%= t(:if_no_argument) %>
7
+
8
+ <h3><%= t(:Options) %></h3>
9
+
10
+ <pre>-R, --recursive
11
+ <%= t(:recursive_search) %></pre>
12
+ <pre>-f, --font NAME
13
+ <%= t(:set_font) %></pre>
14
+
15
+ <h3><%= t(:Keybind) %></h3>
16
+
17
+ <p>
18
+ <%= t(:Common) %>
19
+ <ul>
20
+ <li>n: <%= t(:next) %></li>
21
+ <li>p: <%= t(:prev) %></li>
22
+ <li>r: <%= t(:reload) %></li>
23
+ <li>e: <%= t(:expand_path) %></li>
24
+ <li>q: <%= t(:quit) %></li>
25
+ </ul>
26
+ </p>
27
+
28
+ <p>
29
+ <%= t(:Scroll) %>
30
+ <ul>
31
+ <li>h: <%= t(:left) %></li>
32
+ <li>j: <%= t(:down) %></li>
33
+ <li>k: <%= t(:up) %></li>
34
+ <li>l: <%= t(:right) %></li>
35
+ </ul>
36
+ </p>
37
+
38
+ <p>
39
+ <%= t(:Scale) %>
40
+ <ul>
41
+ <li>+: <%= t(:larger) %></li>
42
+ <li>-: <%= t(:smaller) %></li>
43
+ </ul>
44
+ </p>
45
+
46
+ <p><%= t(:Special) %>
47
+ <ul>
48
+ <li>T: <%= t(:thumbnail) %></li>
49
+ </ul>
50
+ </p>
51
+
52
+ <p><%= t(:Image) %>
53
+ <ul>
54
+ <li>f: <%= t(:fits_window) %></li>
55
+ <li>o: <%= t(:original_size) %></li>
56
+ </ul>
57
+ </p>
58
+
59
+ <p><%= t(:Text) %>
60
+ <ul>
61
+ <li>f: <%= t(:change_font) %></li>
62
+ </ul>
63
+ </p>
64
+
65
+ <p><%= t(:Video) %>
66
+ <ul>
67
+ <li>space: <%= t(:play_pause) %></li>
68
+ </ul>
69
+ </p>
@@ -0,0 +1 @@
1
+ $base-color: gray;
@@ -0,0 +1,44 @@
1
+ @import "./config";
2
+
3
+ body {
4
+ padding: 10px;
5
+ background: #eeeeee;
6
+ }
7
+
8
+ footer {
9
+ margin: 0;
10
+ padding: 5px;
11
+ color: $base-color;
12
+ text-align: right;
13
+ }
14
+
15
+ ul {
16
+ li {
17
+ float: none;
18
+ list-style: none;
19
+ position: relative;
20
+ padding: 3px;
21
+
22
+ a {
23
+ text-decoration: none;
24
+ }
25
+
26
+ label {
27
+ display: block;
28
+ padding: 10px 20px;
29
+ border-radius: 20px 20px 20px 20px;
30
+ font-weight: normal;
31
+ color: black;
32
+ background: rgba(192, 192, 192, 0.2);
33
+ cursor: pointer;
34
+ -webkit-transition: all 0.2s ease-in-out;
35
+ -moz-transition: all 0.2s ease-in-out;
36
+ -o-transition: all 0.2s ease-in-out;
37
+ transition: all 0.2s ease-in-out;
38
+
39
+ &:hover {
40
+ background: rgba(128, 128, 128, 0.5);
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,376 @@
1
+ /*! normalize.css v2.0.1 | MIT License | git.io/normalize */
2
+
3
+ /* ==========================================================================
4
+ HTML5 display definitions
5
+ ========================================================================== */
6
+
7
+ /*
8
+ * Corrects `block` display not defined in IE 8/9.
9
+ */
10
+
11
+
12
+ article,
13
+ aside,
14
+ details,
15
+ figcaption,
16
+ figure,
17
+ footer,
18
+ header,
19
+ hgroup,
20
+ nav,
21
+ section,
22
+ summary {
23
+ display: block;
24
+ }
25
+
26
+ /*
27
+ * Corrects `inline-block` display not defined in IE 8/9.
28
+ */
29
+
30
+ audio,
31
+ canvas,
32
+ video {
33
+ display: inline-block;
34
+ }
35
+
36
+ /*
37
+ * Prevents modern browsers from displaying `audio` without controls.
38
+ * Remove excess height in iOS 5 devices.
39
+ */
40
+
41
+ audio:not([controls]) {
42
+ display: none;
43
+ height: 0;
44
+ }
45
+
46
+ /*
47
+ * Addresses styling for `hidden` attribute not present in IE 8/9.
48
+ */
49
+
50
+ [hidden] {
51
+ display: none;
52
+ }
53
+
54
+ /* ==========================================================================
55
+ Base
56
+ ========================================================================== */
57
+
58
+ /*
59
+ * 1. Sets default font family to sans-serif.
60
+ * 2. Prevents iOS text size adjust after orientation change, without disabling
61
+ * user zoom.
62
+ */
63
+
64
+ html {
65
+ font-family: sans-serif; /* 1 */
66
+ -webkit-text-size-adjust: 100%; /* 2 */
67
+ -ms-text-size-adjust: 100%; /* 2 */
68
+ }
69
+
70
+ /*
71
+ * Removes default margin.
72
+ */
73
+
74
+ body {
75
+ margin: 0;
76
+ }
77
+
78
+ /* ==========================================================================
79
+ Links
80
+ ========================================================================== */
81
+
82
+ /*
83
+ * Addresses `outline` inconsistency between Chrome and other browsers.
84
+ */
85
+
86
+ a:focus {
87
+ outline: thin dotted;
88
+ }
89
+
90
+ /*
91
+ * Improves readability when focused and also mouse hovered in all browsers.
92
+ */
93
+
94
+ a:active,
95
+ a:hover {
96
+ outline: 0;
97
+ }
98
+
99
+ /* ==========================================================================
100
+ Typography
101
+ ========================================================================== */
102
+
103
+ /*
104
+ * Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
105
+ * Safari 5, and Chrome.
106
+ */
107
+
108
+ h1 {
109
+ font-size: 2em;
110
+ }
111
+
112
+ /*
113
+ * Addresses styling not present in IE 8/9, Safari 5, and Chrome.
114
+ */
115
+
116
+ abbr[title] {
117
+ border-bottom: 1px dotted;
118
+ }
119
+
120
+ /*
121
+ * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
122
+ */
123
+
124
+ b,
125
+ strong {
126
+ font-weight: bold;
127
+ }
128
+
129
+ /*
130
+ * Addresses styling not present in Safari 5 and Chrome.
131
+ */
132
+
133
+ dfn {
134
+ font-style: italic;
135
+ }
136
+
137
+ /*
138
+ * Addresses styling not present in IE 8/9.
139
+ */
140
+
141
+ mark {
142
+ background: #ff0;
143
+ color: #000;
144
+ }
145
+
146
+
147
+ /*
148
+ * Corrects font family set oddly in Safari 5 and Chrome.
149
+ */
150
+
151
+ code,
152
+ kbd,
153
+ pre,
154
+ samp {
155
+ font-family: monospace, serif;
156
+ font-size: 1em;
157
+ }
158
+
159
+ /*
160
+ * Improves readability of pre-formatted text in all browsers.
161
+ */
162
+
163
+ pre {
164
+ white-space: pre;
165
+ white-space: pre-wrap;
166
+ word-wrap: break-word;
167
+ }
168
+
169
+ /*
170
+ * Sets consistent quote types.
171
+ */
172
+
173
+ q {
174
+ quotes: "\201C" "\201D" "\2018" "\2019";
175
+ }
176
+
177
+ /*
178
+ * Addresses inconsistent and variable font size in all browsers.
179
+ */
180
+
181
+ small {
182
+ font-size: 80%;
183
+ }
184
+
185
+ /*
186
+ * Prevents `sub` and `sup` affecting `line-height` in all browsers.
187
+ */
188
+
189
+ sub,
190
+ sup {
191
+ font-size: 75%;
192
+ line-height: 0;
193
+ position: relative;
194
+ vertical-align: baseline;
195
+ }
196
+
197
+ sup {
198
+ top: -0.5em;
199
+ }
200
+
201
+ sub {
202
+ bottom: -0.25em;
203
+ }
204
+
205
+ /* ==========================================================================
206
+ Embedded content
207
+ ========================================================================== */
208
+
209
+ /*
210
+ * Removes border when inside `a` element in IE 8/9.
211
+ */
212
+
213
+ img {
214
+ border: 0;
215
+ }
216
+
217
+ /*
218
+ * Corrects overflow displayed oddly in IE 9.
219
+ */
220
+
221
+ svg:not(:root) {
222
+ overflow: hidden;
223
+ }
224
+
225
+ /* ==========================================================================
226
+ Figures
227
+ ========================================================================== */
228
+
229
+ /*
230
+ * Addresses margin not present in IE 8/9 and Safari 5.
231
+ */
232
+
233
+ figure {
234
+ margin: 0;
235
+ }
236
+
237
+ /* ==========================================================================
238
+ Forms
239
+ ========================================================================== */
240
+
241
+ /*
242
+ * Define consistent border, margin, and padding.
243
+ */
244
+
245
+ fieldset {
246
+ border: 1px solid #c0c0c0;
247
+ margin: 0 2px;
248
+ padding: 0.35em 0.625em 0.75em;
249
+ }
250
+
251
+ /*
252
+ * 1. Corrects color not being inherited in IE 8/9.
253
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
254
+ */
255
+
256
+ legend {
257
+ border: 0; /* 1 */
258
+ padding: 0; /* 2 */
259
+ }
260
+
261
+ /*
262
+ * 1. Corrects font family not being inherited in all browsers.
263
+ * 2. Corrects font size not being inherited in all browsers.
264
+ * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
265
+ */
266
+
267
+ button,
268
+ input,
269
+ select,
270
+ textarea {
271
+ font-family: inherit; /* 1 */
272
+ font-size: 100%; /* 2 */
273
+ margin: 0; /* 3 */
274
+ }
275
+
276
+ /*
277
+ * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
278
+ * the UA stylesheet.
279
+ */
280
+
281
+ button,
282
+ input {
283
+ line-height: normal;
284
+ }
285
+
286
+ /*
287
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
288
+ * and `video` controls.
289
+ * 2. Corrects inability to style clickable `input` types in iOS.
290
+ * 3. Improves usability and consistency of cursor style between image-type
291
+ * `input` and others.
292
+ */
293
+
294
+ button,
295
+ html input[type="button"], /* 1 */
296
+ input[type="reset"],
297
+ input[type="submit"] {
298
+ -webkit-appearance: button; /* 2 */
299
+ cursor: pointer; /* 3 */
300
+ }
301
+
302
+ /*
303
+ * Re-set default cursor for disabled elements.
304
+ */
305
+
306
+ button[disabled],
307
+ input[disabled] {
308
+ cursor: default;
309
+ }
310
+
311
+ /*
312
+ * 1. Addresses box sizing set to `content-box` in IE 8/9.
313
+ * 2. Removes excess padding in IE 8/9.
314
+ */
315
+
316
+ input[type="checkbox"],
317
+ input[type="radio"] {
318
+ box-sizing: border-box; /* 1 */
319
+ padding: 0; /* 2 */
320
+ }
321
+
322
+ /*
323
+ * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
324
+ * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
325
+ * (include `-moz` to future-proof).
326
+ */
327
+
328
+ input[type="search"] {
329
+ -webkit-appearance: textfield; /* 1 */
330
+ -moz-box-sizing: content-box;
331
+ -webkit-box-sizing: content-box; /* 2 */
332
+ box-sizing: content-box;
333
+ }
334
+
335
+ /*
336
+ * Removes inner padding and search cancel button in Safari 5 and Chrome
337
+ * on OS X.
338
+ */
339
+
340
+ input[type="search"]::-webkit-search-cancel-button,
341
+ input[type="search"]::-webkit-search-decoration {
342
+ -webkit-appearance: none;
343
+ }
344
+
345
+ /*
346
+ * Removes inner padding and border in Firefox 4+.
347
+ */
348
+
349
+ button::-moz-focus-inner,
350
+ input::-moz-focus-inner {
351
+ border: 0;
352
+ padding: 0;
353
+ }
354
+
355
+ /*
356
+ * 1. Removes default vertical scrollbar in IE 8/9.
357
+ * 2. Improves readability and alignment in all browsers.
358
+ */
359
+
360
+ textarea {
361
+ overflow: auto; /* 1 */
362
+ vertical-align: top; /* 2 */
363
+ }
364
+
365
+ /* ==========================================================================
366
+ Tables
367
+ ========================================================================== */
368
+
369
+ /*
370
+ * Remove most spacing between table cells.
371
+ */
372
+
373
+ table {
374
+ border-collapse: collapse;
375
+ border-spacing: 0;
376
+ }
data/mireru.gemspec CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency("gtksourceview3")
23
23
  spec.add_runtime_dependency("clutter-gtk")
24
24
  spec.add_runtime_dependency("clutter-gstreamer", "= 2.0.2")
25
+ spec.add_runtime_dependency("hexdump")
25
26
 
26
27
  spec.add_development_dependency("test-unit")
27
28
  spec.add_development_dependency("test-unit-notify")
Binary file
@@ -0,0 +1,11 @@
1
+ require "mireru/binary"
2
+
3
+ class BinaryTest < Test::Unit::TestCase
4
+ def test_create
5
+ file = File.join(File.dirname(__FILE__), "fixtures", "Gemfile.gz")
6
+ widget = Mireru::Binary.create(file)
7
+ assert_not_nil(widget)
8
+ assert_equal(Gtk::TextView, widget.class)
9
+ widget.destroy
10
+ end
11
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mireru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masafumi Yokoyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-29 00:00:00.000000000 Z
11
+ date: 2013-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gtk3
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.0.2
69
+ - !ruby/object:Gem::Dependency
70
+ name: hexdump
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: test-unit
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -155,6 +169,7 @@ files:
155
169
  - bin/mireru
156
170
  - images/sorry.png
157
171
  - lib/mireru.rb
172
+ - lib/mireru/binary.rb
158
173
  - lib/mireru/command/mireru.rb
159
174
  - lib/mireru/container.rb
160
175
  - lib/mireru/logger.rb
@@ -163,12 +178,26 @@ files:
163
178
  - lib/mireru/video.rb
164
179
  - lib/mireru/widget.rb
165
180
  - lib/mireru/window.rb
181
+ - middleman/.gitignore
182
+ - middleman/Gemfile
183
+ - middleman/config.rb
184
+ - middleman/data/links.yml
185
+ - middleman/locales/en.yml
186
+ - middleman/locales/ja.yml
187
+ - middleman/source/layouts/layout.haml
188
+ - middleman/source/localizable/index.haml
189
+ - middleman/source/localizable/usage.html.erb
190
+ - middleman/source/stylesheets/_config.scss
191
+ - middleman/source/stylesheets/index.scss
192
+ - middleman/source/stylesheets/vendor/normalize.css
166
193
  - mireru.gemspec
194
+ - test/fixtures/Gemfile.gz
167
195
  - test/fixtures/LICENSE.txt
168
196
  - test/fixtures/nijip.png
169
197
  - test/fixtures/nijip.rb
170
198
  - test/fixtures/no-extention
171
199
  - test/run-test.rb
200
+ - test/test-binary.rb
172
201
  - test/test-container.rb
173
202
  - test/test-logger.rb
174
203
  - test/test-mireru.rb
@@ -201,11 +230,13 @@ signing_key:
201
230
  specification_version: 4
202
231
  summary: Flexible File Viewer Keyboard Friend
203
232
  test_files:
233
+ - test/fixtures/Gemfile.gz
204
234
  - test/fixtures/LICENSE.txt
205
235
  - test/fixtures/nijip.png
206
236
  - test/fixtures/nijip.rb
207
237
  - test/fixtures/no-extention
208
238
  - test/run-test.rb
239
+ - test/test-binary.rb
209
240
  - test/test-container.rb
210
241
  - test/test-logger.rb
211
242
  - test/test-mireru.rb