github-to-canvas 0.0.41 → 0.0.42

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
  SHA256:
3
- metadata.gz: 06a0c55312a2f98cfab18af28e44eff85e7e278178c92c2f87b0ea06e274dc7b
4
- data.tar.gz: e6692af5eb0439d14239a3945d522a55986943a95f2987ba14c651e579459c34
3
+ metadata.gz: 2c38080e6c0827bce0491f53aaada600e08d92ebf0b7a2d61c6d363a460e42ef
4
+ data.tar.gz: b1099325700aadcc9bb0e12115ac5a3c67992ce62ab62277a0aaebd638736319
5
5
  SHA512:
6
- metadata.gz: a1396b11ac39793429af8dc9ae34272d3ebc988475e68294acea92f0df1fd59d190eb5dce02671a1389267c62fed234b207dd67dcf894116b66ea4e914493adf
7
- data.tar.gz: d9ce9f1eb8ef7c8ce1f3675b16f5d8b57e1cdecd1e39f0988a2dad6c14439903e1bad9dce3ff39a7f132d0a1afcd265142d8bf5a2f607fa7ac29cd1510c46dcd
6
+ metadata.gz: ec29a4070f46afe5a7dd580ab24688d9f19dba943d2f93e4850278516eccd583cf41e9793228b77e488aa8ef491d6015634116648339c6f2f0a6fb8f1cb1b8ec
7
+ data.tar.gz: 325b22cf79ef204466723ab79d638ce3c1790bdaf9a8e3485184200b6947d73b4d543fba55e8580591b794216483428faf997d3033a8b2ce128463bd495cd595
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # GitHub to Canvas Gem
1
+ # GitHub to Canvas Gem Test
2
2
 
3
3
  ## Introduction
4
4
 
@@ -131,7 +131,12 @@ if !options[:name]
131
131
  if options[:file_to_convert]
132
132
  options[:name] = options[:file_to_convert]
133
133
  else
134
- options[:name] = File.basename(Dir.getwd)
134
+ markdown = File.read("#{Dir.pwd}/README.md")
135
+ if markdown.match?(/^# .+?\n\n/)
136
+ options[:name] = markdown.match(/^# .+?\n\n/)[0].strip.slice(2,markdown.length)
137
+ else
138
+ options[:name] = File.basename(Dir.getwd)
139
+ end
135
140
  options[:file_to_convert] = "README.md"
136
141
  end
137
142
  end
@@ -1,3 +1,3 @@
1
1
  class GithubToCanvas
2
- VERSION = "0.0.41"
2
+ VERSION = "0.0.42"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-to-canvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.41
4
+ version: 0.0.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - maxwellbenton