styledown 1.0.1.pre.0 → 1.0.1

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,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d47b10ea920be0c6c121c9bb8e1bd8b91b1854f6
4
- data.tar.gz: 8c97be7f883768893fa91bffff4e924aab5482cc
3
+ metadata.gz: df06c86182e53d5b03ec55520225440e2073a516
4
+ data.tar.gz: 9c75d127f8cb337b804c4c8751c7af4b07c7b2e2
5
5
  SHA512:
6
- metadata.gz: a97f16363cdb5a16b140c370a99ecc3c8d94f2e6b65c5121f84dbbd06253febd343eede6df3d5ac32ec5900842ecf7c1276f0fde2f56d7f6c4ab21560939052a
7
- data.tar.gz: 42be8ba2b159310326e6f8a8bf7272840c1abe5fabf7b3e29245c964f77b07482bc7439d97e10b2d27eb2d242a6b0a251886f4f4adcd44b247af0313b4a257dc
6
+ metadata.gz: 01f58d60d4c26115fcf7e2f4386284236d947f57eb8c9a8f0b1c5f34e423ec77028a94104af24857421defb3537c5129bce0973c0ca9ae1d06e26e7e987ce056
7
+ data.tar.gz: be86c407612e46adf0c621f59c452c905337814fdc523c0b7c6a2406b74c55e3572ea09e5b4f01df0313929ed1b6229c7622e526ebd92507916afedb2e3138f9
@@ -0,0 +1,18 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ styledown (1.0.1.pre.0)
5
+ execjs
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ execjs (2.2.1)
11
+ rake (10.3.2)
12
+
13
+ PLATFORMS
14
+ ruby
15
+
16
+ DEPENDENCIES
17
+ rake
18
+ styledown!
data/History.md CHANGED
@@ -1,8 +1,17 @@
1
- ## v1.0.1.pre.0 - September 5, 2014
1
+ ## [v1.0.1]
2
+ > Apr 19, 2016
2
3
 
3
- * Update Styledown source to 1.0.1.
4
- * Add support for `Styledown.parse(array of files)`.
4
+ - Release as a non-prerelease-version. No functional changes.
5
5
 
6
- ## v0.7.0.pre.0 - September 1, 2014
6
+ [v1.0.1]: https://github.com/styledown/styledown-rails/compare/v1.0.1.pre.0...v1.0.1
7
+
8
+ ## v1.0.1.pre.0
9
+ > September 5, 2014
10
+
11
+ - Update Styledown source to 1.0.1.
12
+ - Add support for `Styledown.parse(array of files)`.
13
+
14
+ ## v0.7.0.pre.0
15
+ > September 1, 2014
7
16
 
8
17
  Initial pre-release. No Rails integration, but plain Ruby integration works.
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
-
3
+
4
4
  Rake::TestTask.new do |t|
5
5
  t.test_files = Dir.glob('test/**/*test.rb')
6
6
  end
7
-
8
- task :default => :test
7
+
8
+ task default: :test
data/Readme.md CHANGED
@@ -1,17 +1,20 @@
1
- Styledown-rails
2
- ===============
1
+ Styledown
2
+ =========
3
3
 
4
4
  Ruby integration of [Styledown].
5
5
 
6
- *NB: This is a work in progress. Check back in a few weeks.*
7
6
 
8
- ## Rails integration
7
+ [![Status](http://img.shields.io/travis/styledown/styledown-rails/master.svg?style=flat)](https://travis-ci.org/styledown/styledown-rails "See test builds")
8
+
9
+ ## Ruby integration
9
10
 
10
11
  ```rb
11
12
  # Gemfile
12
13
  gem 'styledown'
13
14
  ```
14
15
 
16
+ [![Gem](https://img.shields.io/gem/v/styledown.svg?style=flat)](http://rubygems.org/gems/styledown "View this project in Rubygems")
17
+
15
18
  ## Plain Ruby integration
16
19
 
17
20
  API for `Styledown.parse` is exactly the same as the JS version ([docs]).
@@ -49,5 +52,5 @@ Authored and maintained by Rico Sta. Cruz with help from [contributors].
49
52
  > Twitter [@rstacruz](https://twitter.com/rstacruz)
50
53
 
51
54
  [MIT License]: http://mit-license.org/
52
- [contributors]: http://github.com/styledown/styledown-ruby/contributors
55
+ [contributors]: http://github.com/styledown/styledown-rails/contributors
53
56
  [Styledown]: https://github.com/styledown/styledown
@@ -12,10 +12,8 @@ module Styledown
12
12
  end
13
13
  end
14
14
 
15
- def parse(source, options={})
16
- if array_of_filenames?(source)
17
- source = unpack_files(source)
18
- end
15
+ def parse(source, options = {})
16
+ source = unpack_files(source) if array_of_filenames?(source)
19
17
 
20
18
  context.call('Styledown.parse', source, options)
21
19
  end
@@ -24,7 +22,7 @@ module Styledown
24
22
  context.eval('Styledown.version')
25
23
  end
26
24
 
27
- private
25
+ private
28
26
 
29
27
  def unpack_files(source)
30
28
  source.map { |file| { name: file, data: File.read(file) } }
@@ -1,5 +1,5 @@
1
1
  module Styledown
2
2
  def self.version
3
- version = "1.0.1-0"
3
+ '1.0.1'
4
4
  end
5
5
  end
@@ -18,4 +18,5 @@ Gem::Specification.new do |s|
18
18
  s.license = 'MIT'
19
19
 
20
20
  s.add_dependency 'execjs', '>= 0'
21
+ s.add_development_dependency 'rake', '>= 0'
21
22
  end
@@ -1,17 +1,17 @@
1
1
  require File.expand_path('../test_helper', __FILE__)
2
2
 
3
- describe "Styledown.js_version" do
4
- it "produces a string" do
3
+ describe 'Styledown.js_version' do
4
+ it 'produces a string' do
5
5
  Styledown.js_version.must_match /^\d+\.\d+\.\d+/
6
6
  end
7
7
  end
8
8
 
9
- describe "Basic parsing" do
9
+ describe 'Basic parsing' do
10
10
  before do
11
11
  @output = Styledown.parse('### hi')
12
12
  end
13
13
 
14
- it "produces an HTML fragment" do
14
+ it 'produces an HTML fragment' do
15
15
  @output.must_match /<h3[^>]+>hi<\/h3>/
16
16
  end
17
17
 
@@ -20,19 +20,19 @@ describe "Basic parsing" do
20
20
  end
21
21
  end
22
22
 
23
- describe "Working with many files" do
23
+ describe 'Working with many files' do
24
24
  before do
25
25
  @output = Styledown.parse([
26
- { :name => "input.md", :data => "### hi from md" },
27
- { :name => "input.css", :data => "/**\n * hi from css:\n * world\n */" }
26
+ { name: 'input.md', data: '### hi from md' },
27
+ { name: 'input.css', data: "/**\n * hi from css:\n * world\n */" }
28
28
  ])
29
29
  end
30
30
 
31
- it "parses the Markdown file" do
31
+ it 'parses the Markdown file' do
32
32
  @output.must_match /<h3[^>]+>hi from md<\/h3>/
33
33
  end
34
34
 
35
- it "parses the CSS file" do
35
+ it 'parses the CSS file' do
36
36
  @output.must_match /<h3[^>]+>hi from css<\/h3>/
37
37
  end
38
38
  end
@@ -42,11 +42,11 @@ describe 'head options' do
42
42
  @output = Styledown.parse('### hi', head: '<meta>')
43
43
  end
44
44
 
45
- it "includes the head text" do
45
+ it 'includes the head text' do
46
46
  @output.must_match /<meta>/
47
47
  end
48
48
 
49
- it "produces an HTML document" do
49
+ it 'produces an HTML document' do
50
50
  @output.must_match /^<!doctype html>/
51
51
  end
52
52
  end
@@ -4,17 +4,17 @@ require './lib/styledown'
4
4
  begin
5
5
  require 'minitest/reporters'
6
6
  if ENV['reporter'] == 'spec'
7
- Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new(:color => true)
7
+ Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new(color: true)
8
8
  else
9
9
  Minitest::Reporters.use! Minitest::Reporters::ProgressReporter.new
10
10
  end
11
11
  rescue LoadError => e
12
12
  end
13
13
 
14
- def test_path(path='')
14
+ def test_path(path = '')
15
15
  File.expand_path("../#{path}", __FILE__)
16
16
  end
17
17
 
18
- def fixture_path(path='')
18
+ def fixture_path(path = '')
19
19
  test_path "fixtures/#{path}"
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: styledown
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1.pre.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rico Sta. Cruz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-05 00:00:00.000000000 Z
11
+ date: 2016-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description:
28
42
  email: hi@ricostacruz.com
29
43
  executables: []
@@ -36,6 +50,7 @@ files:
36
50
  - ".gitignore"
37
51
  - ".travis.yml"
38
52
  - Gemfile
53
+ - Gemfile.lock
39
54
  - History.md
40
55
  - Notes.md
41
56
  - Rakefile
@@ -64,12 +79,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
79
  version: '0'
65
80
  required_rubygems_version: !ruby/object:Gem::Requirement
66
81
  requirements:
67
- - - ">"
82
+ - - ">="
68
83
  - !ruby/object:Gem::Version
69
- version: 1.3.1
84
+ version: '0'
70
85
  requirements: []
71
86
  rubyforge_project:
72
- rubygems_version: 2.2.2
87
+ rubygems_version: 2.5.1
73
88
  signing_key:
74
89
  specification_version: 4
75
90
  summary: "..."