jektop 0.1.2 → 0.1.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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1e3d6bf8ed13e3b8ae6d89dc8fee6bc99fa7aa06
4
- data.tar.gz: c69b2c89b4833c3840359d4fa1a70c197de5484e
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZDY5ZjhhZjE1NDMyMjczNTZjZWY5MWMzOTZmMzdiMDdhMjgwNjZhNw==
5
+ data.tar.gz: !binary |-
6
+ N2UwMjhhZDlhMjhiYmIxM2I4NTZhMDQzOTY2OGEyOTNkZWFlOWIzYw==
5
7
  SHA512:
6
- metadata.gz: 52ac63ad48e4e3929222dd12e8aa9edb316e0ab57177f7f80666cdb8167ef1fe744baea1f45b9e5bd1312e9fd7a432eb2e30ee4bbe8ecc962199ad188632a052
7
- data.tar.gz: 7617ad041c13a16d7445dc4d4c4b17b0edd4383226fd25081b1627fe9d721ef07cae79c881f20f2890c538a11f5960a0d7250d8c461f8c6b11c5206dcd547b20
8
+ metadata.gz: !binary |-
9
+ ODdkYWJhNmE0YjY2N2M3ZDczMjZkMDMwZGY1ZmRjYWZkNDcwNWE1ZDNjYzlh
10
+ ZTljMTgxY2ExYWYyN2ZhZTI2MzM4N2YyZjE2ZGMwZTVjMWUwZmQ4OTZkMjky
11
+ MThkZDYwZWFkYmFmZTUwOGIyYmMxN2JlZDNhOWM1YTU0YTkyMDk=
12
+ data.tar.gz: !binary |-
13
+ YjU4ZTNiOWJkNGQwYjAyNWFhZTgwOTI4ZDczYWExODM5MzM3ODRkYTljYmFm
14
+ OGViOGZlYTA4Y2MxMzdjZTU5OTQ0ZGI4MmE2MTJhODRlMDMxY2JjMzk1OGZj
15
+ MTUyOTdmNDlmYTliNDgyZmQyMDdlOWRlMWYyY2QyMGZhYWQ4YjE=
File without changes
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ deploy:
3
+ provider: rubygems
4
+ api_key:
5
+ secure: cSc0iSh09jwIsAughHqQMClFQBfxfgn5BdMZOwdunXv4UNU9LKbRFJYkhYCYZeOPH+CJCKcnMfKdpKZF6vhFTJG+S5lYTKw+lSw/NkTrE+J4hHoXY39zw9wnAsIfWlmRDBYWr/9jO+pxbZZEz+tKg5hbdYZRI86e/k8LB794k7w=
6
+ gem: jektop
7
+ on:
8
+ repo: Jylhis/Jektop
data/Gemfile CHANGED
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in jektop.gemspec
4
4
  gemspec
5
+ gem 'coveralls', require: false
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # Jektop
2
+ [![license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://badges.github.io/shields/)
3
+ [![Gem Version](https://badge.fury.io/rb/jektop.png)](http://badge.fury.io/rb/jektop)
4
+ [![Build Status](https://travis-ci.org/Jylhis/Jektop.png?branch=master)](https://travis-ci.org/Jylhis/Jektop)
5
+ [![Coverage Status](https://coveralls.io/repos/Jylhis/Jektop/badge.png)](https://coveralls.io/r/Jylhis/Jektop)
2
6
 
3
7
  With this gem you can easily create new Jekyll posts
4
8
 
data/Rakefile CHANGED
@@ -1 +1,8 @@
1
- require "bundler/gem_tasks"
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+
7
+ desc "Run tests"
8
+ task :default => :test
@@ -16,20 +16,30 @@ module Jektop
16
16
  categories = categories_in
17
17
  post_text = post_in
18
18
 
19
-
20
- h = location.length
21
- if location[h-1,1] == "/"
22
- blog_location = location
19
+ if location == "test"
20
+ @test == true
23
21
  else
24
- blog_location = location+"/"
22
+ h = location.length
23
+ if location[h-1,1] == "/"
24
+ blog_location = location
25
+ else
26
+ blog_location = location+"/"
27
+ end
25
28
  end
26
29
 
27
- date = Jektop::Date.give_date false
28
- new_post = File.new("#{blog_location}#{date}-#{title}.markdown", "w")
30
+ if @test = true
31
+ date = Jektop::Date.give_date false
32
+ else
33
+ new_post = File.new("#{blog_location}#{date}-#{title}.markdown", "w")
34
+ end
29
35
 
30
- date = Jektop::Date.give_date true
31
- new_post.puts("---\nlayout: post\ntitle: #{title}\ndate: #{date}\ncategories: #{categories}\n---\n#{post_text}")
32
- new_post.close
36
+ if @test = true
37
+ date = Jektop::Date.give_date true
38
+ else
39
+ new_post.puts("---\nlayout: post\ntitle: #{title}\ndate: #{date}\ncategories: #{categories}\n---\n#{post_text}")
40
+ new_post.close
41
+ end
42
+ return true
33
43
  end
34
44
 
35
45
  end
@@ -1,3 +1,3 @@
1
1
  module Jektop
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -0,0 +1,10 @@
1
+ require 'test/unit'
2
+ require 'jektop'
3
+ require 'coveralls'
4
+ Coveralls.wear!
5
+
6
+ class JektopTest < Test::Unit::TestCase
7
+ def test_new_post
8
+ assert_equal true, Jektop.new("test", "title", "categories", "post text")
9
+ end
10
+ end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jektop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Jylhänkangas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Ever wanted to make Jekyll post easily? Now you can with this gem
@@ -45,7 +45,9 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - ".gitignore"
48
+ - .coveralls.yml
49
+ - .gitignore
50
+ - .travis.yml
49
51
  - Gemfile
50
52
  - LICENSE.txt
51
53
  - README.md
@@ -55,6 +57,7 @@ files:
55
57
  - lib/jektop.rb
56
58
  - lib/jektop/date.rb
57
59
  - lib/jektop/version.rb
60
+ - test/test_jektop.rb
58
61
  homepage: https://github.com/Jylhis/Jektop
59
62
  licenses:
60
63
  - MIT
@@ -65,12 +68,12 @@ require_paths:
65
68
  - lib
66
69
  required_ruby_version: !ruby/object:Gem::Requirement
67
70
  requirements:
68
- - - ">="
71
+ - - ! '>='
69
72
  - !ruby/object:Gem::Version
70
73
  version: '0'
71
74
  required_rubygems_version: !ruby/object:Gem::Requirement
72
75
  requirements:
73
- - - ">="
76
+ - - ! '>='
74
77
  - !ruby/object:Gem::Version
75
78
  version: '0'
76
79
  requirements: []
@@ -79,4 +82,5 @@ rubygems_version: 2.2.2
79
82
  signing_key:
80
83
  specification_version: 4
81
84
  summary: Make Jekyll posts easily
82
- test_files: []
85
+ test_files:
86
+ - test/test_jektop.rb