animenewsnetwork 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.
| @@ -21,6 +21,8 @@ class AnimeNewsNetwork::Encyclopedia::Reports | |
| 21 21 | 
             
                  data[:episodes] = item.xpath('nb_episodes')[0].text.to_i
         | 
| 22 22 | 
             
                  data[:start_date], data[:end_date] =
         | 
| 23 23 | 
             
                    item.xpath('production_date')[0].text.match(/([\d\-]+) to ([\d\-]+)/) { [$1, $2] }
         | 
| 24 | 
            +
                  data[:days] = item.xpath('nb_days')[0].text.to_i
         | 
| 25 | 
            +
                  data[:avg_days_between_eps] = item.xpath('avg_days_between_eps')[0].text.to_f
         | 
| 24 26 | 
             
                  data
         | 
| 25 27 | 
             
                end
         | 
| 26 28 | 
             
              end
         | 
| @@ -46,8 +48,8 @@ class AnimeNewsNetwork::Encyclopedia::Reports | |
| 46 48 | 
             
                  anime = item.xpath('anime')[0]
         | 
| 47 49 | 
             
                  data[:id] = anime['href'].match(/id=(\d+)/) { $1.to_i }
         | 
| 48 50 | 
             
                  data[:title] = anime.text
         | 
| 49 | 
            -
                  data[: | 
| 50 | 
            -
                  data[: | 
| 51 | 
            +
                  data[:votes] = item.xpath('nb_votes')[0].text.to_i
         | 
| 52 | 
            +
                  data[:seen] = item.xpath('nb_seen')[0].text.to_i
         | 
| 51 53 | 
             
                  data[:straight_average] = item.xpath('straight_average')[0].text.to_f
         | 
| 52 54 | 
             
                  data[:weighted_average] = item.xpath('weighted_average')[0].text.to_f
         | 
| 53 55 | 
             
                  data[:bayesian_average] = item.xpath('bayesian_average')[0].text.to_f
         | 
| @@ -29,11 +29,13 @@ describe AnimeNewsNetwork::Encyclopedia::Reports do | |
| 29 29 | 
             
                subject { reports.anime_series_length() }
         | 
| 30 30 | 
             
                it { should be_a Array }
         | 
| 31 31 | 
             
                its(:first) { should eq Hash[
         | 
| 32 | 
            -
                  id: | 
| 33 | 
            -
                  title: | 
| 34 | 
            -
                  episodes: | 
| 35 | 
            -
                  start_date: | 
| 36 | 
            -
                  end_date: | 
| 32 | 
            +
                  id:                   15201,
         | 
| 33 | 
            +
                  title:                "Otona Joshi no Anime Time (TV 2)",
         | 
| 34 | 
            +
                  episodes:             3,
         | 
| 35 | 
            +
                  start_date:           "2013-03-10",
         | 
| 36 | 
            +
                  end_date:             "2013-03-24",
         | 
| 37 | 
            +
                  days:                 15,
         | 
| 38 | 
            +
                  avg_days_between_eps: 7.0,
         | 
| 37 39 | 
             
                ] }
         | 
| 38 40 | 
             
              end
         | 
| 39 41 |  | 
| @@ -52,10 +54,10 @@ describe AnimeNewsNetwork::Encyclopedia::Reports do | |
| 52 54 | 
             
                subject { reports.anime_ratings() }
         | 
| 53 55 | 
             
                it { should be_a Array }
         | 
| 54 56 | 
             
                its(:first) { should eq Hash[
         | 
| 55 | 
            -
                  id: | 
| 56 | 
            -
                  title: | 
| 57 | 
            -
                   | 
| 58 | 
            -
                   | 
| 57 | 
            +
                  id:               11770,
         | 
| 58 | 
            +
                  title:            "Steins;Gate (TV)",
         | 
| 59 | 
            +
                  votes:            2733,
         | 
| 60 | 
            +
                  seen:             3903,
         | 
| 59 61 | 
             
                  straight_average: 9.230199813842773,
         | 
| 60 62 | 
             
                  weighted_average: 9.122900009155273,
         | 
| 61 63 | 
             
                  bayesian_average: 9.116583824157715,
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: animenewsnetwork
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.4
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 188 188 | 
             
                  version: '0'
         | 
| 189 189 | 
             
                  segments:
         | 
| 190 190 | 
             
                  - 0
         | 
| 191 | 
            -
                  hash:  | 
| 191 | 
            +
                  hash: 1192811091722580587
         | 
| 192 192 | 
             
            requirements: []
         | 
| 193 193 | 
             
            rubyforge_project: 
         | 
| 194 194 | 
             
            rubygems_version: 1.8.23
         |