simple-piwik 0.5.3 → 0.5.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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/piwik/site.rb +13 -1
  3. data/simple-piwik.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.3
1
+ 0.5.4
data/lib/piwik/site.rb CHANGED
@@ -174,7 +174,18 @@ module Piwik
174
174
  result.to_i
175
175
  end
176
176
  alias_method :pageviews, :actions
177
-
177
+
178
+ # Returns a string with the javascript tracking code for the supplied site, identified
179
+ # by it's Id in <tt>site_id</tt>.
180
+ #
181
+ # Equivalent Piwik API call: SitesManager.getJavascriptTag (idSite)
182
+ def get_javascript_tag
183
+ raise UnknownSite, "Site not existent in Piwik yet, call 'save' first" if new?
184
+ result = call('SitesManager.getJavascriptTag', :idSite => id)
185
+ puts "get_javascript_tag #{result.to_s}"
186
+ result
187
+ end
188
+
178
189
  private
179
190
  # Loads the attributes in the instance variables.
180
191
  def load_attributes(attributes)
@@ -212,5 +223,6 @@ module Piwik
212
223
  }
213
224
  attributes
214
225
  end
226
+
215
227
  end
216
228
  end
data/simple-piwik.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simple-piwik}
8
- s.version = "0.5.3"
8
+ s.version = "0.5.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{mihael}]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: simple-piwik
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.3
5
+ version: 0.5.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - mihael