lknovel 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -2,3 +2,5 @@
2
2
  0.0.2: Move block all out of Chapter/Volume class, use more helper function and
3
3
  mixin to generalize code.
4
4
  0.0.3: Cover image hot fix, update list css
5
+ 0.0.4: Remove unnecessary require, check if cover image exist in template and
6
+ crop
data/Gemfile CHANGED
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in lknovel.gemspec
4
4
  gemspec
5
+ gem 'coveralls', require: false
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # Lknovel
2
+ [![Build Status](https://travis-ci.org/azuwis/ruby-lknovel.png)](https://travis-ci.org/azuwis/ruby-lknovel)
3
+ [![Coverage Status](https://coveralls.io/repos/azuwis/ruby-lknovel/badge.png)](https://coveralls.io/r/azuwis/ruby-lknovel)
4
+ [![Dependency Status](https://gemnasium.com/azuwis/ruby-lknovel.svg)](https://gemnasium.com/azuwis/ruby-lknovel)
5
+ [![Gem Version](https://badge.fury.io/rb/lknovel.png)](http://badge.fury.io/rb/lknovel)
2
6
 
3
7
  Generate epub from http://lknovel.lightnovel.cn/
4
8
 
@@ -4,7 +4,6 @@ require 'gepub'
4
4
  require 'lknovel/volume'
5
5
  require 'optparse'
6
6
  require 'ostruct'
7
- require 'pry'
8
7
 
9
8
  module Lknovel
10
9
  class App
@@ -40,7 +40,8 @@ module Lknovel
40
40
  need_crop = yield(width, height) if block_given?
41
41
  cropped = false
42
42
  if need_crop
43
- if system('convert', input, '-crop', operation, output)
43
+ success = system('convert', input, '-crop', operation, output)
44
+ if success and File.exists?(output)
44
45
  cropped = true
45
46
  end
46
47
  end
@@ -1,5 +1,5 @@
1
1
  module Lknovel
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  MODULE_PATH = File.expand_path('..', __FILE__)
4
4
  TEMPLATE_PATH = File.join(MODULE_PATH, 'templates')
5
5
  STYLESHEET_PATH = File.join(MODULE_PATH, 'assets', 'stylesheets')
@@ -5,7 +5,9 @@
5
5
  <link href="<%= "../#{Lknovel::STYLESHEET_DIR}/default.css" %>" rel="stylesheet" type="text/css"/>
6
6
  </head>
7
7
  <body>
8
+ <% if @cover_image -%>
8
9
  <img class="page-break" src="<%= "../#{Lknovel::IMAGE_DIR}/#{@cover_image}" %>">
10
+ <% end -%>
9
11
  <h1>简介</h1>
10
12
  <p><%= @intro %></p>
11
13
  <nav epub:type="toc" id="toc">
@@ -1,3 +1,9 @@
1
+ begin
2
+ require 'coveralls'
3
+ Coveralls.wear!
4
+ rescue LoadError
5
+ end
6
+
1
7
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
8
 
3
9
  require 'minitest/autorun'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lknovel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-19 00:00:00.000000000 Z
12
+ date: 2014-03-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler