screenshots 0.0.3 → 0.0.4

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: db76255b423b3f085bdb174833124134578c2f92
4
- data.tar.gz: 9296933819e4f9ed52049ccf7a80eeee7cad931a
3
+ metadata.gz: c32891d0e1947f10107b23ce66ec01314dfeff7e
4
+ data.tar.gz: 85b05e4cf67e84910e5ecacb4fe64a30e5b1900d
5
5
  SHA512:
6
- metadata.gz: d3e91334b9d057bec25dc2a4353ee9c5b138dc1358b9b8dae33f1ebe096789b62f0e43f68b76c976dcc5383bb2ce02692dcbaa7e60069147d6620fa6dfa1d465
7
- data.tar.gz: 4b4b1339b079c0974198c1323b96ba91cb619557ae760bce48bda50c76254a84621bc78183dc5e3b2dd132091061b09ce7d25c6ac5db671e147b3a7171e797b0
6
+ metadata.gz: 2183256919c92b08c96ec62db4dd4bd49db04b78ac0e4e0fa39c6d6b1d60cb7284dc380f979ceb55ba909a65ee82f2da1aa3950bc3a0de9b6ef6c85b73bfb371
7
+ data.tar.gz: f2e13de8f4bc8cf7243bbf5f7926577940096d9ae05d7327db9228e634204b6357ec79f999cb6e8510e4b7a84e8530d7f1ae899da627c96d7a0747ab536713fd
@@ -31,11 +31,15 @@ if urls.empty?
31
31
  exit -1
32
32
  end
33
33
 
34
- # Generate the HTML
34
+ # Config
35
+ current_month = Time.now.strftime("%m")
36
+ current_year = Time.now.year
35
37
  Screenshots.configure do |config|
36
- config.blog_assets_url = 'http://www.codeur.com/blog/wp-content/uploads/2014/07'
38
+ config.blog_assets_url = "http://www.codeur.com/blog/wp-content/uploads/#{current_year}/#{current_month}"
37
39
  config.image_extension = 'jpeg'
38
40
  end
41
+
42
+ # Generate the HTML
39
43
  html = Screenshots::Processor.generate_list(urls)
40
44
 
41
45
  # Print output on disk
@@ -17,8 +17,10 @@ module Screenshots
17
17
  end
18
18
 
19
19
  def generate_blog_section
20
- section = "<h2><a href=\"#{@url}\">#{@title}</a></h2>\n"
21
- section += "<img src=\"#{screenshot_url}\" />\n"
20
+ section = "<h2><a href=\"#{@url}\" title=\"#{@title}\">#{@title}</a></h2>\n"
21
+ section += "<a href=\"#{@url}\">"
22
+ section += "<img src=\"#{screenshot_url}\" alt=\"#{@title}\" title=\"#{@title}\" />"
23
+ section += "</a>\n"
22
24
  end
23
25
 
24
26
  def screenshot_url
@@ -1,3 +1,3 @@
1
1
  module Screenshots
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1,14 +1,14 @@
1
1
  module TestData
2
2
 
3
3
  def github_html_section
4
- %Q(<h2><a href="https://github.com/rails/rails?param=1&x=2">rails/rails · GitHub</a></h2>
5
- <img src="http://blog/https_github.com_rails_rails_param_1_x_2.jpg" />
4
+ %Q(<h2><a href="https://github.com/rails/rails?param=1&x=2" title="rails/rails · GitHub">rails/rails · GitHub</a></h2>
5
+ <a href="https://github.com/rails/rails?param=1&x=2"><img src="http://blog/https_github.com_rails_rails_param_1_x_2.jpg" alt="rails/rails · GitHub" title="rails/rails · GitHub" /></a>
6
6
  )
7
7
  end
8
8
 
9
9
  def google_html_section
10
- %Q(<h2><a href="http://www.google.com">Google</a></h2>
11
- <img src="http://blog/http_www.google.com.jpg" />
10
+ %Q(<h2><a href="http://www.google.com" title="Google">Google</a></h2>
11
+ <a href="http://www.google.com"><img src="http://blog/http_www.google.com.jpg" alt="Google" title="Google" /></a>
12
12
  )
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: screenshots
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Goulain